Commit 4b133cc460 for ffmpeg

commit 4b133cc46096d835bd154b1aaa6cb7625360344c
Author: Michael Niedermayer <michael@niedermayer.cc>
Date:   Thu Nov 12 01:27:14 2026 +0100

    avfilter/vf_median: limit the number of jobs by the current radiusV

    Fixes: out of array read
    Fixes: NidYeIfje6hU

    Found during the triage of a finding from the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25800

    Out of array read Replicated through UnModified FFmpeg with ASAN

diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c
index 69d855822e..62535b7b0f 100644
--- a/libavfilter/vf_median.c
+++ b/libavfilter/vf_median.c
@@ -245,7 +245,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     av_frame_copy_props(out, in);

     td.in = in; td.out = out;
-    ff_filter_execute(ctx, filter_slice, &td, NULL, s->nb_threads);
+    ff_filter_execute(ctx, filter_slice, &td, NULL,
+                      av_clip(s->planeheight[1] / (s->radiusV + 1), 1, s->nb_threads));

     av_frame_free(&in);
     return ff_filter_frame(outlink, out);