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

fix segv, always set audio_buf to audio_buf1 if decoding fail

Originally committed as revision 16512 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-01-09 23:54:57 +00:00
parent 9211bcddb4
commit 1a1078faa4

View File

@ -1684,6 +1684,7 @@ static void sdl_audio_callback(void *opaque, Uint8 *stream, int len)
audio_size = audio_decode_frame(is, &pts);
if (audio_size < 0) {
/* if error, just output silence */
is->audio_buf = is->audio_buf1;
is->audio_buf_size = 1024;
memset(is->audio_buf, 0, is->audio_buf_size);
} else {