From f15c734be1650cee240cd65b0dbd31fe6993a5bc Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 17 Feb 2015 00:47:47 +0100 Subject: avfilter/vf_phase: Add () to protect DIFF()s arguments Signed-off-by: Michael Niedermayer --- libavfilter/vf_phase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter') diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c index 82dc603efe..23b339c880 100644 --- a/libavfilter/vf_phase.c +++ b/libavfilter/vf_phase.c @@ -106,7 +106,7 @@ static int config_input(AVFilterLink *inlink) * * (The result is actually multiplied by 25) */ -#define DIFF(a, as, b, bs) (t = ((*a - b[bs]) << 2) + a[as << 1] - b[-bs], t * t) +#define DIFF(a, as, b, bs) ((t) = ((*(a) - (b)[bs]) << 2) + (a)[(as) << 1] - (b)[-(bs)], (t) * (t)) /* * Find which field combination has the smallest average squared difference -- cgit v1.2.3