[Ffmpeg-cvslog] r7070 - trunk/libavcodec/mpegaudiodec.c

michael subversion
Tue Nov 14 21:39:20 CET 2006


Author: michael
Date: Tue Nov 14 21:39:20 2006
New Revision: 7070

Modified:
   trunk/libavcodec/mpegaudiodec.c

Log:
reset internal buffer during seeking


Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	(original)
+++ trunk/libavcodec/mpegaudiodec.c	Tue Nov 14 21:39:20 2006
@@ -2590,6 +2590,11 @@
     return buf_size;
 }
 
+static void flush(AVCodecContext *avctx){
+    MPADecodeContext *s = avctx->priv_data;
+    s->last_buf_size= 0;
+}
+
 #ifdef CONFIG_MP3ADU_DECODER
 static int decode_frame_adu(AVCodecContext * avctx,
                         void *data, int *data_size,
@@ -2825,6 +2830,7 @@
     NULL,
     decode_frame,
     CODEC_CAP_PARSE_ONLY,
+    .flush= flush,
 };
 #endif
 #ifdef CONFIG_MP3ADU_DECODER
@@ -2839,6 +2845,7 @@
     NULL,
     decode_frame_adu,
     CODEC_CAP_PARSE_ONLY,
+    .flush= flush,
 };
 #endif
 #ifdef CONFIG_MP3ON4_DECODER
@@ -2852,6 +2859,6 @@
     NULL,
     decode_close_mp3on4,
     decode_frame_mp3on4,
-    0
+    .flush= flush,
 };
 #endif




More information about the ffmpeg-cvslog mailing list