From 7ae2ded0d12bb36a82ee928c3a543a00aee4b466 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 19 Mar 2022 10:50:56 +0100 Subject: [PATCH] avfilter/avf_ahistogram: fix off by one in slide mode --- libavfilter/avf_ahistogram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index 71b0cdf04c..ebd4949b3d 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -400,7 +400,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->slide == SCROLL) { for (p = 0; p < 4; p++) { - for (y = s->h; y >= H + 1; y--) { + for (y = s->h - 1; y >= H + 1; y--) { memmove(s->out->data[p] + (y ) * s->out->linesize[p], s->out->data[p] + (y-1) * s->out->linesize[p], w); }