This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit beaeda6021c70fba29f5b87eeead53bc37996b13 Author: James Almer <[email protected]> AuthorDate: Tue Nov 24 11:12:49 2026 -0300 Commit: James Almer <[email protected]> CommitDate: Tue Nov 24 20:17:31 2026 -0300 avcodec/lcevcdec: flush pictures on decoder flush Assisted by Claude Signed-off-by: James Almer <[email protected]> (cherry picked from commit b3e02ac13bcf54411fc7608abd0c8127a5366319) --- 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 c9ec6a49e2..06005dbf08 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -2426,6 +2426,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 e3d28c7a18..40bb3d246b 100644 --- a/libavcodec/lcevcdec.c +++ b/libavcodec/lcevcdec.c @@ -169,6 +169,17 @@ static int lcevc_flush_pictures(FFLCEVCContext *lcevc) return 0; } +void ff_lcevc_flush(FFLCEVCContext *lcevc) +{ + if (!lcevc || lcevc->initialized != FF_LCEVCDEC_INIT) + 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 91b58d15a5..0419a078b2 100644 --- a/libavcodec/lcevcdec.h +++ b/libavcodec/lcevcdec.h @@ -65,6 +65,7 @@ typedef struct FFLCEVCFrame { int ff_lcevc_alloc(FFLCEVCContext **plcevc, AVDictionary **options, 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]
