Commit 4b92ea3f authored by michael's avatar michael

reset internal buffer during seeking


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7070 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 44755f4f
...@@ -2590,6 +2590,11 @@ retry: ...@@ -2590,6 +2590,11 @@ retry:
return buf_size; return buf_size;
} }
static void flush(AVCodecContext *avctx){
MPADecodeContext *s = avctx->priv_data;
s->last_buf_size= 0;
}
#ifdef CONFIG_MP3ADU_DECODER #ifdef CONFIG_MP3ADU_DECODER
static int decode_frame_adu(AVCodecContext * avctx, static int decode_frame_adu(AVCodecContext * avctx,
void *data, int *data_size, void *data, int *data_size,
...@@ -2825,6 +2830,7 @@ AVCodec mp3_decoder = ...@@ -2825,6 +2830,7 @@ AVCodec mp3_decoder =
NULL, NULL,
decode_frame, decode_frame,
CODEC_CAP_PARSE_ONLY, CODEC_CAP_PARSE_ONLY,
.flush= flush,
}; };
#endif #endif
#ifdef CONFIG_MP3ADU_DECODER #ifdef CONFIG_MP3ADU_DECODER
...@@ -2839,6 +2845,7 @@ AVCodec mp3adu_decoder = ...@@ -2839,6 +2845,7 @@ AVCodec mp3adu_decoder =
NULL, NULL,
decode_frame_adu, decode_frame_adu,
CODEC_CAP_PARSE_ONLY, CODEC_CAP_PARSE_ONLY,
.flush= flush,
}; };
#endif #endif
#ifdef CONFIG_MP3ON4_DECODER #ifdef CONFIG_MP3ON4_DECODER
...@@ -2852,6 +2859,6 @@ AVCodec mp3on4_decoder = ...@@ -2852,6 +2859,6 @@ AVCodec mp3on4_decoder =
NULL, NULL,
decode_close_mp3on4, decode_close_mp3on4,
decode_frame_mp3on4, decode_frame_mp3on4,
0 .flush= flush,
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment