[FFmpeg-cvslog] avfilter/vf_swaprect: Use height for vertical variables

Michael Niedermayer git at videolan.org
Sun Apr 14 23:59:29 EEST 2024


ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Fri Dec 22 22:26:22 2023 +0100| [6c8b1116a88bbef3f9f2a427060fa0f74120fa5a] | committer: Michael Niedermayer

avfilter/vf_swaprect: Use height for vertical variables

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 9f4c5bd7d23eb94afe85290e03748f52483102b8)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavfilter/vf_swaprect.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c
index c9da2806bd..9f7b6f2ec8 100644
--- a/libavfilter/vf_swaprect.c
+++ b/libavfilter/vf_swaprect.c
@@ -147,10 +147,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
     w = dw; h = dh; x1[0] = dx1; y1[0] = dy1; x2[0] = dx2; y2[0] = dy2;
 
     x1[0] = av_clip(x1[0], 0, inlink->w - 1);
-    y1[0] = av_clip(y1[0], 0, inlink->w - 1);
+    y1[0] = av_clip(y1[0], 0, inlink->h - 1);
 
     x2[0] = av_clip(x2[0], 0, inlink->w - 1);
-    y2[0] = av_clip(y2[0], 0, inlink->w - 1);
+    y2[0] = av_clip(y2[0], 0, inlink->h - 1);
 
     ah[1] = ah[2] = FF_CEIL_RSHIFT(h, s->desc->log2_chroma_h);
     ah[0] = ah[3] = h;



More information about the ffmpeg-cvslog mailing list