mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
7e929dac10
commit
2a9e1c122e
@ -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
|
||||
|
@ -26,10 +26,13 @@
|
||||
#include "audio_frame_queue.h"
|
||||
#include "internal.h"
|
||||
|
||||
#ifdef AACENCODER_LIB_VL0
|
||||
#define FDKENC_VER_AT_LEAST(vl0, vl1) \
|
||||
(defined(AACENCODER_LIB_VL0) && \
|
||||
((AACENCODER_LIB_VL0 > vl0) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1)))
|
||||
((AACENCODER_LIB_VL0 > vl0) || \
|
||||
(AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))
|
||||
#else
|
||||
#define FDKENC_VER_AT_LEAST(vl0, vl1) 0
|
||||
#endif
|
||||
|
||||
typedef struct AACContext {
|
||||
const AVClass *class;
|
||||
|
Loading…
x
Reference in New Issue
Block a user