aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-01-09 23:54:57 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-01-09 23:54:57 +0000
commit1a1078faa4217c32394a931865ed4b7a3cce634e (patch)
treef26c8467b93b79dd59ecd409f042de6d8c337295 /ffplay.c
parent9211bcddb40be355f8e65e6142175d6b5d939b76 (diff)
downloadffmpeg-1a1078faa4217c32394a931865ed4b7a3cce634e.tar.gz
fix segv, always set audio_buf to audio_buf1 if decoding fail
Originally committed as revision 16512 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ffplay.c b/ffplay.c
index 12190dacfa..ebe31d18b9 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -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 {