diff --git a/Changelog b/Changelog index 2c90688610..c1e74af1af 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 3.4.1: +- avcodec/decode: reset codec on receiving packet after EOF in compat_decode - avcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED() - avcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97* - avcodec/extract_extradata_bsf: Fix leak discovered via fuzzing diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 1337ffb527..fb1824be1c 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -753,6 +753,11 @@ static int compat_decode(AVCodecContext *avctx, AVFrame *frame, av_assert0(avci->compat_decode_consumed == 0); + if (avci->draining_done && pkt && pkt->size != 0) { + av_log(avctx, AV_LOG_WARNING, "Got unexpected packet after EOF\n"); + avcodec_flush_buffers(avctx); + } + *got_frame = 0; avci->compat_decode = 1;