avcodec/mpegaudiodec: Reset dither and mdct state
This makes the mp3 decoder produce the same result when repeatly flushing and decoding Suggested-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ccff45a0d3
commit
bd650ee318
@ -1705,7 +1705,9 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr,
|
|||||||
static void mp_flush(MPADecodeContext *ctx)
|
static void mp_flush(MPADecodeContext *ctx)
|
||||||
{
|
{
|
||||||
memset(ctx->synth_buf, 0, sizeof(ctx->synth_buf));
|
memset(ctx->synth_buf, 0, sizeof(ctx->synth_buf));
|
||||||
|
memset(ctx->mdct_buf, 0, sizeof(ctx->mdct_buf));
|
||||||
ctx->last_buf_size = 0;
|
ctx->last_buf_size = 0;
|
||||||
|
ctx->dither_state = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void flush(AVCodecContext *avctx)
|
static void flush(AVCodecContext *avctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user