aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-16 23:59:39 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-16 23:59:39 +0100
commitcb9d40451cb2f9d863355f76aa62ef8e5fcf4960 (patch)
tree0b9427be14c34b52c1f2394ee3e88f890aea3a74
parent0b638b83c66d50482320000e125aa3701920d451 (diff)
downloadffmpeg-cb9d40451cb2f9d863355f76aa62ef8e5fcf4960.tar.gz
avcodec/ac3: add () to protect the macro arguments
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ac3.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 871640b8c8..1fe30b9587 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -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