[FFmpeg-devel] mp3 seeking issue.
michaelni at gmx.at
Sun Oct 21 21:10:19 CEST 2012
On Sun, Oct 21, 2012 at 10:51:50AM -0700, Dale Curtis wrote:
> On Sun, Oct 21, 2012 at 12:45 AM, Reimar Döffinger <Reimar.Doeffinger at gmx.de
> > wrote:
> > I think this is a very long standing bug in the MP3 decoder, it probably
> > does not reset some of the state in the flush function.
> > Nobody ever investigated it properly to my knowledge.
> I had some time this morning, I'm not sure if this is correct but it gets
> rid of most of the seek artifacting:
> diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
> index 77f86c5..1c1e317 100644
> --- a/libavcodec/mpegaudiodec.c
> +++ b/libavcodec/mpegaudiodec.c
> @@ -1716,6 +1716,9 @@ static void flush(AVCodecContext *avctx)
> MPADecodeContext *s = avctx->priv_data;
> memset(s->synth_buf, 0, sizeof(s->synth_buf));
> + memset(s->last_buf, 0, sizeof(s->last_buf));
> + memset(s->sb_samples, 0, sizeof(s->sb_samples));
> s->last_buf_size = 0;
> There's still a slight clicking noise, but otherwise it sounds much better.
seeking artifacts in mp3 should be fixed
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel