[FFmpeg-cvslog] avfilter/avf_ahistogram: fix off by one in slide mode

Paul B Mahol git at videolan.org
Sat Mar 19 11:52:19 EET 2022


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Mar 19 10:50:56 2022 +0100| [7ae2ded0d12bb36a82ee928c3a543a00aee4b466] | committer: Paul B Mahol

avfilter/avf_ahistogram: fix off by one in slide mode

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ae2ded0d12bb36a82ee928c3a543a00aee4b466
---

 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);
                 }



More information about the ffmpeg-cvslog mailing list