[FFmpeg-cvslog] avfilter/vf_phase: Add () to protect DIFF()s arguments

Michael Niedermayer git at videolan.org
Tue Feb 17 00:58:04 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 17 00:47:47 2015 +0100| [f15c734be1650cee240cd65b0dbd31fe6993a5bc] | committer: Michael Niedermayer

avfilter/vf_phase: Add () to protect DIFF()s arguments

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/vf_phase.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c
index 82dc603..23b339c 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



More information about the ffmpeg-cvslog mailing list