This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.0 in repository ffmpeg.
commit 76bdd281e3ad80e57d387c4d812443f5fd2eb42f Author: James Almer <[email protected]> AuthorDate: Tue Nov 24 11:12:49 2026 -0300 Commit: Michael Niedermayer <[email protected]> CommitDate: Wed Nov 25 01:31:44 2026 +0100 avcodec/lcevcdec: flush pictures on decoder flush Assisted by Claude Signed-off-by: James Almer <[email protected]> (cherry picked from commit b3e02ac13bcf54411fc7608abd0c8127a5366319) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/decode.c | 5 +++++ libavcodec/lcevcdec.c | 11 +++++++++++ libavcodec/lcevcdec.h | 1 + 3 files changed, 17 insertions(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 141f22ccc4..fe4c2b59f5 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -2409,6 +2409,11 @@ av_cold void ff_decode_flush_buffers(AVCodecContext *avctx) dc->nb_draining_errors = 0; dc->draining_started = 0; + +#if CONFIG_LIBLCEVC_DEC + if (!avci->is_frame_mt) + ff_lcevc_flush(dc->lcevc.ctx); +#endif } av_cold AVCodecInternal *ff_decode_internal_alloc(void) diff --git a/libavcodec/lcevcdec.c b/libavcodec/lcevcdec.c index 1bb0fc468a..7290508908 100644 --- a/libavcodec/lcevcdec.c +++ b/libavcodec/lcevcdec.c @@ -168,6 +168,17 @@ static int lcevc_flush_pictures(FFLCEVCContext *lcevc) return 0; } +void ff_lcevc_flush(FFLCEVCContext *lcevc) +{ + if (!lcevc || !lcevc->initialized) + return; + + if (LCEVC_FlushDecoder(lcevc->decoder) != LCEVC_Success || + LCEVC_SynchronizeDecoder(lcevc->decoder, 0) != LCEVC_Success || + lcevc_flush_pictures(lcevc) < 0) + av_log(lcevc, AV_LOG_ERROR, "Failed to flush LCEVC decoder\n"); +} + static int lcevc_send_frame(FFLCEVCFrame *frame_ctx, const AVFrame *in) { FFLCEVCContext *lcevc = frame_ctx->lcevc; diff --git a/libavcodec/lcevcdec.h b/libavcodec/lcevcdec.h index 16f133861c..0408e413a9 100644 --- a/libavcodec/lcevcdec.h +++ b/libavcodec/lcevcdec.h @@ -53,6 +53,7 @@ typedef struct FFLCEVCFrame { int ff_lcevc_alloc(FFLCEVCContext **plcevc, int loglevel); int ff_lcevc_process(void *logctx, struct AVFrame *frame); +void ff_lcevc_flush(FFLCEVCContext *lcevc); int ff_lcevc_parse_frame(FFLCEVCContext *lcevc, const struct AVFrame *frame, enum AVPixelFormat *format, enum AVPixelFormat *base_format, int *width, int *height); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
