# HG changeset patch # User michael # Date 1163536760 0 # Node ID 14250f6ff483fc00100d2eed0b3b4b12d8a2c247 # Parent af24e0fd0d1ba47370d9fca6cc11242fb4cf2bcc reset internal buffer during seeking diff -r af24e0fd0d1b -r 14250f6ff483 mpegaudiodec.c --- a/mpegaudiodec.c Tue Nov 14 20:35:15 2006 +0000 +++ b/mpegaudiodec.c Tue Nov 14 20:39:20 2006 +0000 @@ -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