1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

fixed stereo grab

Originally committed as revision 135 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Fabrice Bellard 2001-09-19 22:09:30 +00:00
parent e30a284687
commit 1d7840aaec

View File

@ -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: