changeset 35720:7c91c2a669f4

demux_lavf: Fix CODEC_ID availability ifdefs and add a missing one
author diego
date Mon, 21 Jan 2013 23:05:17 +0000
parents a11fa641a711
children 684e793fe7b7
files libmpdemux/demux_lavf.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_lavf.c	Mon Jan 21 23:05:14 2013 +0000
+++ b/libmpdemux/demux_lavf.c	Mon Jan 21 23:05:17 2013 +0000
@@ -433,8 +433,11 @@
         case AVMEDIA_TYPE_SUBTITLE:{
             sh_sub_t* sh_sub;
             char type;
-            if (codec->codec_id == AV_CODEC_ID_TEXT ||
-                codec->codec_id == AV_CODEC_ID_SUBRIP)
+            if (codec->codec_id == AV_CODEC_ID_TEXT
+#if LIBAVUTIL_VERSION_MICRO >= 100
+                || codec->codec_id == AV_CODEC_ID_SUBRIP
+#endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
+                )
                 type = 't';
             else if (codec->codec_id == AV_CODEC_ID_MOV_TEXT)
                 type = 'm';
@@ -450,10 +453,10 @@
                 type = 'd';
             else if (codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE)
                 type = 'p';
-#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
+#if LIBAVUTIL_VERSION_MICRO >= 100
             else if (codec->codec_id == AV_CODEC_ID_EIA_608)
                 type = 'c';
-#endif
+#endif /* LIBAVUTIL_VERSION_MICRO >= 100 */
             else if(codec->codec_tag == MKTAG('c', '6', '0', '8'))
                 type = 'c';
             else