Commit 62fad741ba for ffmpeg

commit 62fad741bad03f5541438e48cdc874c43a78097a
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Sun Nov 8 14:11:02 2026 +0100

    avfilter/vf_lcevc: wait for the flushed frames before collecting their base pictures

    LCEVC_FlushDecoder() only marks the pending frames as flushed, their
    base pictures become available once their tasks have run. uninit()
    collected the base pictures right after the flush, so the input frames
    attached to frames still pending at that point were never freed.

    Fixes: memleak

    Found during triage of the Fairy review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25134

    Memleak Replicated through UnModified FFmpeg with ASAN

diff --git a/libavfilter/vf_lcevc.c b/libavfilter/vf_lcevc.c
index 39ebd032ef..02d17e8023 100644
--- a/libavfilter/vf_lcevc.c
+++ b/libavfilter/vf_lcevc.c
@@ -447,7 +447,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
     LCEVCContext *lcevc = ctx->priv;

-    LCEVC_FlushDecoder(lcevc->decoder);
+    LCEVC_SynchronizeDecoder(lcevc->decoder, 1);
     flush_bases(ctx);
     LCEVC_DestroyDecoder(lcevc->decoder);
     av_frame_free(&lcevc->out);