[FFmpeg-devel] [PATCH] avfilter/vf_geq: Use av_clipd() instead of av_clipf()

Michael Niedermayer michael at niedermayer.cc
Sat Oct 12 14:55:21 EEST 2019


With floats we cannot represent all 32bit integer dimensions

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
 libavfilter/vf_geq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c
index 91eb9685f9..8b1c7726dc 100644
--- a/libavfilter/vf_geq.c
+++ b/libavfilter/vf_geq.c
@@ -88,8 +88,8 @@ static inline double getpix(void *priv, double x, double y, int plane)
     if (!src)
         return 0;
 
-    xi = x = av_clipf(x, 0, w - 2);
-    yi = y = av_clipf(y, 0, h - 2);
+    xi = x = av_clipd(x, 0, w - 2);
+    yi = y = av_clipd(y, 0, h - 2);
 
     x -= xi;
     y -= yi;
-- 
2.23.0



More information about the ffmpeg-devel mailing list