changeset 34404:95f802285711

Allow compilation with Libav Some CPP Macros and codec ids are not (yet) available in libav, so use them only if they are actually defined. This doesn't work for code ids, as they are defined as enums. Therefore, #ifdefs tests for the presence of the respective codec. This approach should also allow to compile mplayer against earlier versions of FFmpeg.
author siretart
date Tue, 03 Jan 2012 15:51:26 +0000
parents bca629bb50cf
children 35fd66684548
files fmt-conversion.c libmpdemux/mp_taglists.c
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/fmt-conversion.c	Mon Jan 02 16:48:18 2012 +0000
+++ b/fmt-conversion.c	Tue Jan 03 15:51:26 2012 +0000
@@ -57,9 +57,11 @@
     {IMGFMT_RGB8,    PIX_FMT_BGR8},
     {IMGFMT_RGB4,    PIX_FMT_BGR4},
     {IMGFMT_BGR8,    PIX_FMT_PAL8},
+#ifdef PIX_FMT_0RGB32
     {IMGFMT_BGR32,   PIX_FMT_0RGB32},
+#endif
 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51, 20, 1)
-    {IMGFMT_GBR24P,  PIX_FMT_GBR24P},
+    {IMGFMT_GBR24P,  PIX_FMT_GBRP},
 #endif
     {IMGFMT_YUY2,    PIX_FMT_YUYV422},
     {IMGFMT_UYVY,    PIX_FMT_UYVY422},
--- a/libmpdemux/mp_taglists.c	Mon Jan 02 16:48:18 2012 +0000
+++ b/libmpdemux/mp_taglists.c	Tue Jan 03 15:51:26 2012 +0000
@@ -43,7 +43,9 @@
     { CODEC_ID_COOK,              MKTAG('c', 'o', 'o', 'k')},
     { CODEC_ID_DSICINAUDIO,       MKTAG('D', 'C', 'I', 'A')},
     { CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3')},
+#ifdef CONFIG_FFWAVESYNTH_DECODER
     { CODEC_ID_FFWAVESYNTH,       MKTAG('F', 'F', 'W', 'S')},
+#endif
     { CODEC_ID_G723_1,            MKTAG('7', '2', '3', '1')},
     { CODEC_ID_INTERPLAY_DPCM,    MKTAG('I', 'N', 'P', 'A')},
     { CODEC_ID_MLP,               MKTAG('M', 'L', 'P', ' ')},
@@ -85,7 +87,9 @@
     { CODEC_ID_DVVIDEO,           MKTAG('d', 'v', 's', 'd')},
     { CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3')},
     { CODEC_ID_ESCAPE124,         MKTAG('E', '1', '2', '4')},
+#ifdef CONFIG_ESCAPE130_DECODER
     { CODEC_ID_ESCAPE130,         MKTAG('E', '1', '3', '0')},
+#endif
     { CODEC_ID_FLV1,              MKTAG('F', 'L', 'V', '1')},
     { CODEC_ID_G729,              MKTAG('G', '7', '2', '9')},
     { CODEC_ID_H264,              MKTAG('H', '2', '6', '4')},