aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2001-09-19 22:09:30 +0000
committerFabrice Bellard <fabrice@bellard.org>2001-09-19 22:09:30 +0000
commit1d7840aaec9b2bb76fe93e9ae4aed21804287b55 (patch)
tree2284d71612a09796db54f0c5871808e01b68566e /ffmpeg.c
parente30a28468794efdfa8fcadf54ef14ff39736166b (diff)
downloadffmpeg-1d7840aaec9b2bb76fe93e9ae4aed21804287b55.tar.gz
fixed stereo grab
Originally committed as revision 135 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 57c1b78ee3..a17eb216b9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -192,9 +192,9 @@ static int read_key(void)
/* main loop for grabbing */
int av_grab(AVFormatContext *s)
{
- UINT8 audio_buf[AUDIO_FIFO_SIZE/2];
- UINT8 audio_buf1[AUDIO_FIFO_SIZE/2];
- UINT8 audio_out[AUDIO_FIFO_SIZE/2];
+ UINT8 audio_buf[AUDIO_FIFO_SIZE];
+ UINT8 audio_buf1[AUDIO_FIFO_SIZE];
+ UINT8 audio_out[AUDIO_FIFO_SIZE];
UINT8 video_buffer[1024*1024];
char buf[256];
short *samples;
@@ -364,8 +364,8 @@ int av_grab(AVFormatContext *s)
ost->resample = audio_resample_init(enc->channels, channels,
enc->sample_rate, sample_rate);
}
- if (fifo_init(&ost->fifo, (2 * audio_fifo_size * enc->sample_rate) /
- sample_rate))
+ if (fifo_init(&ost->fifo, (2 * audio_fifo_size * enc->sample_rate *
+ enc->channels) / sample_rate))
goto fail;
break;
case CODEC_TYPE_VIDEO: