diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 20:39:20 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-11-14 20:39:20 +0000 |
commit | 9bb328d39764deafd9ed2f07187b106ff86d696a (patch) | |
tree | edcb0326b4cd16551b41862f1b15ad393518133f /libavcodec/mpegaudiodec.c | |
parent | bd60e11bf44c0dc4fd6c5f36414e256325040831 (diff) | |
download | ffmpeg-streaming-9bb328d39764deafd9ed2f07187b106ff86d696a.zip ffmpeg-streaming-9bb328d39764deafd9ed2f07187b106ff86d696a.tar.gz |
reset internal buffer during seeking
Originally committed as revision 7070 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r-- | libavcodec/mpegaudiodec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 2a91bb3..bc83f92 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -2590,6 +2590,11 @@ retry: 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 @@ AVCodec mp3_decoder = NULL, decode_frame, CODEC_CAP_PARSE_ONLY, + .flush= flush, }; #endif #ifdef CONFIG_MP3ADU_DECODER @@ -2839,6 +2845,7 @@ AVCodec mp3adu_decoder = NULL, decode_frame_adu, CODEC_CAP_PARSE_ONLY, + .flush= flush, }; #endif #ifdef CONFIG_MP3ON4_DECODER @@ -2852,6 +2859,6 @@ AVCodec mp3on4_decoder = NULL, decode_close_mp3on4, decode_frame_mp3on4, - 0 + .flush= flush, }; #endif |