History

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.

Andreas Rheinhardt committed 5 years ago

Commit 5a413b31 parent 6ff2aba1 file · +3 −2Browse files

Unified · Split

libavcodec/allcodecs.c+3−2
@@ -766,10 +766,11 @@ extern const AVCodec ff_libx262_encoder; · 765 unmodified lines
766766 #if CONFIG_LIBX264_ENCODER
767767 #include <x264.h>
768768 #if X264_BUILD < 153
769−extern AVCodec ff_libx264_encoder;
769+#define LIBX264_CONST
770770 #else
771−extern const AVCodec ff_libx264_encoder;
771+#define LIBX264_CONST const
772772 #endif
773+extern LIBX264_CONST AVCodec ff_libx264_encoder;
773774 #endif
774775 extern const AVCodec ff_libx264rgb_encoder;
775776 extern AVCodec ff_libx265_encoder;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t