From 0967c0dc30a4e91d26ef72c0d5cd2c69dda8613b Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sun, 18 Mar 2012 14:18:47 -0500 Subject: [PATCH] Fix incorrect precompiler conditionals for libav/ffmpeg versions. Needed to support ffmpeg 0.9 and 0.10 releases. --- src/modules/avformat/consumer_avformat.c | 4 ++-- src/modules/avformat/producer_avformat.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 0b0322ea..424ad9f5 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -237,7 +237,7 @@ static int consumer_start( mlt_consumer consumer ) mlt_properties_set_data( properties, "acodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); mlt_properties_set_data( doc, "audio_codecs", codecs, 0, NULL, NULL ); while ( ( codec = av_codec_next( codec ) ) ) -#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(34<<8)+0) +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO ) #else if ( codec->encode && codec->type == CODEC_TYPE_AUDIO ) @@ -261,7 +261,7 @@ static int consumer_start( mlt_consumer consumer ) mlt_properties_set_data( properties, "vcodec", codecs, 0, (mlt_destructor) mlt_properties_close, NULL ); mlt_properties_set_data( doc, "video_codecs", codecs, 0, NULL, NULL ); while ( ( codec = av_codec_next( codec ) ) ) -#if LIBAVCODEC_VERSION_INT >= ((53<<16)+(34<<8)+0) +#if LIBAVCODEC_VERSION_INT >= ((54<<16)+(0<<8)+0) if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO ) #else if ( codec->encode && codec->type == CODEC_TYPE_VIDEO ) diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c index 39fbda09..8465d210 100644 --- a/src/modules/avformat/producer_avformat.c +++ b/src/modules/avformat/producer_avformat.c @@ -1264,7 +1264,7 @@ static void convert_image( AVFrame *frame, uint8_t *buffer, int pix_fmt, // extract alpha from planar formats if ( ( pix_fmt == PIX_FMT_YUVA420P -#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(35<<8)+0) +#if LIBAVUTIL_VERSION_INT >= ((51<<16)+(35<<8)+101) || pix_fmt == PIX_FMT_YUVA444P #endif ) && -- 2.39.2