summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-11 03:14:30 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-13 23:22:27 +0200
commit5a413b392e90a01fce695b4d8d646583ea439362 (patch)
tree948b5b21f1c2496ca987464850740ee51d41c920 /libavcodec
parent6ff2aba08811876bfdc3c7df6f73f47f27b93803 (diff)
avcodec/allcodecs: Don't include libx264 twice in the list of codecs
Since a247ac640df3da573cd661065bf53f37863e2b46, allcodecs.c contained two lines that matched the regex used by find_filters_extern in configure; as a result, libx264 appeared twice the list of codecs (if enabled). Fix this by using only one matching line by adding a preprocessor define for the part that differed in the two old lines: The const qualifier. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/allcodecs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 0b15b59364..623db2a9fa 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -766,10 +766,11 @@ extern const AVCodec ff_libx262_encoder;
#if CONFIG_LIBX264_ENCODER
#include <x264.h>
#if X264_BUILD < 153
-extern AVCodec ff_libx264_encoder;
+#define LIBX264_CONST
#else
-extern const AVCodec ff_libx264_encoder;
+#define LIBX264_CONST const
#endif
+extern LIBX264_CONST AVCodec ff_libx264_encoder;
#endif
extern const AVCodec ff_libx264rgb_encoder;
extern AVCodec ff_libx265_encoder;