]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wavpack.h
Merge commit '0f532fd3f9b9ca974cea0feb8ddcaf4a7f3b23c5'
[ffmpeg] / libavcodec / wavpack.h
index 6cb49a1b3ebe9d144c0bbb8acdde611151499002..a1b46d5bd74d08de048f5bf7feb76784314ef9cf 100644 (file)
@@ -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; \
         } \
     }