[FFmpeg-devel] A question about flushing the MP3 decoder.

Michael Niedermayer michaelni at gmx.at
Thu Jun 5 21:37:16 CEST 2014


On Wed, Jun 04, 2014 at 06:03:51PM -0700, Dale Curtis wrote:
> I'm noticing that decoding packets, flushing, and then decoding the same
> packets again doesn't give exactly the same buffers back (as indicated by
> an MD5 sum). I was able to "fix" this by adding the following to mp_flush():
> 
>     memset(ctx->mdct_buf, 0, sizeof(ctx->mdct_buf));
>     ctx->dither_state = 0;

> 
> Is this correct / necessary?

i would assume that it still doesnt match if one compares packet X
while flushing and decoding started from different points prior
each time. (due to dither state being different)

But reseting these should do no harm, so applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140605/cd75365c/attachment.asc>


More information about the ffmpeg-devel mailing list