[vlc-commits] avcodec: fix version checks

Zhao Zhili git at videolan.org
Thu Jan 3 18:48:30 CET 2019


vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Thu Dec 27 16:08:44 2018 +0800| [486fd0b80fbe878f00a906005295cceb4a2fd624] | committer: Rémi Denis-Courmont

avcodec: fix version checks

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=486fd0b80fbe878f00a906005295cceb4a2fd624
---

 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 293ead515e..8b17f92744 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 },



More information about the vlc-commits mailing list