diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-16 13:24:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-02-16 13:24:11 +0100 |
commit | 1fa8884aeb942d934e30cc8e8a419ef8d458f7ea (patch) | |
tree | de83714fed372e207d51f9095540911ae9c9214f | |
parent | 8365c1a15c9457a193fde87c3425e533569ffd79 (diff) | |
download | ffmpeg-1fa8884aeb942d934e30cc8e8a419ef8d458f7ea.tar.gz |
avcodec/opusenc: Add () protecting macro arguments
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/opusenc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/opusenc.c b/libavcodec/opusenc.c index 1a829ed11a..b774e28c65 100644 --- a/libavcodec/opusenc.c +++ b/libavcodec/opusenc.c @@ -40,9 +40,9 @@ /* 120 ms / 2.5 ms = 48 frames (extremely improbable, but the encoder'll work) */ #define OPUS_MAX_FRAMES_PER_PACKET 48 -#define OPUS_BLOCK_SIZE(x) (2 * 15 * (1 << (x + 2))) +#define OPUS_BLOCK_SIZE(x) (2 * 15 * (1 << ((x) + 2))) -#define OPUS_SAMPLES_TO_BLOCK_SIZE(x) (ff_log2(x / (2 * 15)) - 2) +#define OPUS_SAMPLES_TO_BLOCK_SIZE(x) (ff_log2((x) / (2 * 15)) - 2) typedef struct OpusEncOptions { float max_delay_ms; |