mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 10:22:10 +00:00
avcodec/wavpack: Add () to protect the arguments of UPDATE_WEIGHT_CLIP()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
dfc2a3982f
commit
b7c19aee6c
@ -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; \
|
||||
} \
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user