diff options
author | Martin Storsjö <martin@martin.st> | 2018-09-12 23:03:12 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2018-09-13 22:11:50 +0300 |
commit | 2a9e1c122eed66be1b26b747342b848300b226c7 (patch) | |
tree | fc41beaa835de59294f4fdb1a08b40d4e8a6c64b /libavcodec/libfdk-aacdec.c | |
parent | 7e929dac100916fc45cb95e231025f3439c20156 (diff) | |
download | ffmpeg-2a9e1c122eed66be1b26b747342b848300b226c7.tar.gz |
libfdk-aac: Don't use defined() in a #define
MSVC expands the preprocessor directives differently, making the
version check fail in the previous form.
Clang can warn about this with -Wexpansion-to-defined (not currently
enabled by default):
warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined]
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/libfdk-aacdec.c')
-rw-r--r-- | libavcodec/libfdk-aacdec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c index ca70a49ad4..63856232d9 100644 --- a/libavcodec/libfdk-aacdec.c +++ b/libavcodec/libfdk-aacdec.c @@ -25,10 +25,13 @@ #include "avcodec.h" #include "internal.h" +#ifdef AACDECODER_LIB_VL0 #define FDKDEC_VER_AT_LEAST(vl0, vl1) \ - (defined(AACDECODER_LIB_VL0) && \ - ((AACDECODER_LIB_VL0 > vl0) || \ - (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1))) + ((AACDECODER_LIB_VL0 > vl0) || \ + (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)) +#else +#define FDKDEC_VER_AT_LEAST(vl0, vl1) 0 +#endif #if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10 #define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS |