avcodec/ac3: add () to protect the macro arguments
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Feb 2015 22:59:39 +0000 (23:59 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Feb 2015 22:59:39 +0000 (23:59 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ac3.h

index 871640b..1fe30b9 100644 (file)
@@ -67,8 +67,8 @@
 #define AC3_RENAME(x)           x ## _fixed
 #define AC3_NORM(norm)          (1<<24)/(norm)
 #define AC3_MUL(a,b)            ((((int64_t) (a)) * (b))>>12)
-#define AC3_RANGE(x)            (x|((x&128)<<1))
-#define AC3_HEAVY_RANGE(x)      (x<<1)
+#define AC3_RANGE(x)            ((x)|(((x)&128)<<1))
+#define AC3_HEAVY_RANGE(x)      ((x)<<1)
 #define AC3_DYNAMIC_RANGE(x)    (x)
 #define AC3_SPX_BLEND(x)        (x)
 #define AC3_DYNAMIC_RANGE1      0