Commit 5b7385af authored by glantau's avatar glantau

fixed stereo grab


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@135 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 19a05b8d
...@@ -192,9 +192,9 @@ static int read_key(void) ...@@ -192,9 +192,9 @@ static int read_key(void)
/* main loop for grabbing */ /* main loop for grabbing */
int av_grab(AVFormatContext *s) int av_grab(AVFormatContext *s)
{ {
UINT8 audio_buf[AUDIO_FIFO_SIZE/2]; UINT8 audio_buf[AUDIO_FIFO_SIZE];
UINT8 audio_buf1[AUDIO_FIFO_SIZE/2]; UINT8 audio_buf1[AUDIO_FIFO_SIZE];
UINT8 audio_out[AUDIO_FIFO_SIZE/2]; UINT8 audio_out[AUDIO_FIFO_SIZE];
UINT8 video_buffer[1024*1024]; UINT8 video_buffer[1024*1024];
char buf[256]; char buf[256];
short *samples; short *samples;
...@@ -364,8 +364,8 @@ int av_grab(AVFormatContext *s) ...@@ -364,8 +364,8 @@ int av_grab(AVFormatContext *s)
ost->resample = audio_resample_init(enc->channels, channels, ost->resample = audio_resample_init(enc->channels, channels,
enc->sample_rate, sample_rate); enc->sample_rate, sample_rate);
} }
if (fifo_init(&ost->fifo, (2 * audio_fifo_size * enc->sample_rate) / if (fifo_init(&ost->fifo, (2 * audio_fifo_size * enc->sample_rate *
sample_rate)) enc->channels) / sample_rate))
goto fail; goto fail;
break; break;
case CODEC_TYPE_VIDEO: case CODEC_TYPE_VIDEO:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment