summaryrefslogtreecommitdiffstats
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 6cb49a1..a1b46d5 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; \
} \
}
OpenPOWER on IntegriCloud