# HG changeset patch # User siretart # Date 1325605886 0 # Node ID 95f802285711df146caf7a4a57bfa16d5086a9b9 # Parent bca629bb50cfaeea6731752700ed664a84375c13 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. diff -r bca629bb50cf -r 95f802285711 fmt-conversion.c --- 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}, diff -r bca629bb50cf -r 95f802285711 libmpdemux/mp_taglists.c --- 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')},