[vlc-devel] [PATCH] avcodec: fix version checks
Zhao Zhili
quinkblack at foxmail.com
Thu Dec 27 09:08:44 CET 2018
---
modules/codec/avcodec/fourcc.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index 293ead5..8b17f92 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -290,25 +290,27 @@ static const struct vlc_avcodec_fourcc video_codecs[] =
{ VLC_CODEC_MAGICYUV, AV_CODEC_ID_MAGICYUV },
#endif
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 24, 102 )
+#if LIBAVCODEC_VERSION_MICRO >= 100 /* FFmpeg only */
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 24, 102 )
{ VLC_CODEC_CINEFORM, AV_CODEC_ID_CFHD },
#endif
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 70, 100 )
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 70, 100 )
{ VLC_CODEC_PIXLET, AV_CODEC_ID_PIXLET },
#endif
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 101 )
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 71, 101 )
{ VLC_CODEC_SPEEDHQ, AV_CODEC_ID_SPEEDHQ },
#endif
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 79, 100 )
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 57, 79, 100 )
{ VLC_CODEC_FMVC, AV_CODEC_ID_FMVC },
#endif
-#if LIBAVCODEC_VERSION_CHECK( 58, 999, 999, 24, 100 )
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 58, 24, 100 )
{ VLC_CODEC_IMM4, AV_CODEC_ID_IMM4 },
#endif
+#endif /* FFmpeg only */
};
/*
@@ -423,7 +425,7 @@ static const struct vlc_avcodec_fourcc audio_codecs[] =
/* AV_CODEC_ID_WESTWOOD_SND1 */
{ VLC_CODEC_GSM, AV_CODEC_ID_GSM },
{ VLC_CODEC_QDM2, AV_CODEC_ID_QDM2 },
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 )
+#if (LIBAVCODEC_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 71, 100))
{ VLC_CODEC_QDMC, AV_CODEC_ID_QDMC },
#endif
{ VLC_CODEC_COOK, AV_CODEC_ID_COOK },
@@ -499,7 +501,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] =
{ VLC_CODEC_SSA, AV_CODEC_ID_SSA },
{ VLC_CODEC_TX3G, AV_CODEC_ID_MOV_TEXT },
{ VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
-#if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 )
+#if (LIBAVCODEC_VERSION_MICRO >= 100) && (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 71, 100))
{ VLC_CODEC_BD_TEXT, AV_CODEC_ID_HDMV_TEXT_SUBTITLE },
#endif
{ VLC_CODEC_TELETEXT, AV_CODEC_ID_DVB_TELETEXT },
--
2.9.5
More information about the vlc-devel
mailing list