aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_edgedetect.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-10-16 18:06:47 +0200
committerPaul B Mahol <onemda@gmail.com>2019-10-16 18:28:32 +0200
commit932913f0b406814d9c374c5e1a5ab6aa45a53168 (patch)
tree350ee6baff35ef4a36f13f8700c80014d195668a /libavfilter/vf_edgedetect.c
parent7b94b22261c216f2eeaaa089e6a003d46f6a3458 (diff)
downloadffmpeg-932913f0b406814d9c374c5e1a5ab6aa45a53168.tar.gz
avfilter/vf_edgedetect: fix undefined behaviour
Fixes #8287
Diffstat (limited to 'libavfilter/vf_edgedetect.c')
-rw-r--r--libavfilter/vf_edgedetect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c
index 25424dbcce..a5614ea63b 100644
--- a/libavfilter/vf_edgedetect.c
+++ b/libavfilter/vf_edgedetect.c
@@ -216,7 +216,7 @@ static int get_rounded_direction(int gx, int gy)
if (gx < 0)
gx = -gx, gy = -gy;
- gy <<= 16;
+ gy *= (1 << 16);
tanpi8gx = 27146 * gx;
tan3pi8gx = 158218 * gx;
if (gy > -tan3pi8gx && gy < -tanpi8gx) return DIRECTION_45UP;