From b965c180c796f9a0a19829ebfaabe2dbce2f03a1 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 14 Jun 2026 21:35:25 +0200 Subject: [PATCH] avfilter/avf_showcwt: fix DIRECTION_RL EOF fill clearing the wrong columns Signed-off-by: Michael Niedermayer (cherry picked from commit 5f13df1b518203036c9c3436a64eb70c8d409e7c) Signed-off-by: Michael Niedermayer --- libavfilter/avf_showcwt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c index 6574839823..e995208e00 100644 --- a/libavfilter/avf_showcwt.c +++ b/libavfilter/avf_showcwt.c @@ -1150,7 +1150,7 @@ static int output_frame(AVFilterContext *ctx) case DIRECTION_RL: for (int p = 0; p < nb_planes; p++) { ptrdiff_t linesize = s->outpicref->linesize[p]; - const int size = s->w - s->pos; + const int size = FFMIN(s->pos + 1, s->sono_size); const int fill = p > 0 && p < 3 ? 128 : 0; for (int y = 0; y < s->h; y++) {