From 386b987f2a8c4abe507d2d58136acc0ef4ace9a3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 12 Oct 2019 13:46:04 +0200 Subject: [PATCH] avfilter/vf_geq: Use av_clipd() instead of av_clipf() With floats we cannot represent all 32bit integer dimensions Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer (cherry picked from commit c8813b1a984714f0027cabeea2394035df20cf38) Signed-off-by: Michael Niedermayer --- 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 36dbd421ce..f441c591f9 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -82,8 +82,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;