summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/wavpack.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/wavpack.h b/libavcodec/wavpack.h
index 6cb49a1b3e..a1b46d5bd7 100644
--- a/libavcodec/wavpack.h
+++ b/libavcodec/wavpack.h
@@ -104,15 +104,15 @@ typedef struct WvChannel {
// macros for applying weight
#define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \
- if (samples && in) { \
- if ((samples ^ in) < 0) { \
- weight -= delta; \
- if (weight < -1024) \
- weight = -1024; \
+ if ((samples) && (in)) { \
+ if (((samples) ^ (in)) < 0) { \
+ (weight) -= (delta); \
+ if ((weight) < -1024) \
+ (weight) = -1024; \
} else { \
- weight += delta; \
- if (weight > 1024) \
- weight = 1024; \
+ (weight) += (delta); \
+ if ((weight) > 1024) \
+ (weight) = 1024; \
} \
}