diff --git a/libmlt-0.8.2-ffmpeg1.patch b/libmlt-0.8.2-ffmpeg1.patch new file mode 100644 index 0000000..14b4aeb --- /dev/null +++ b/libmlt-0.8.2-ffmpeg1.patch @@ -0,0 +1,36 @@ +Index: src/modules/avformat/consumer_avformat.c +=================================================================== +--- src/modules/avformat/consumer_avformat.c.orig ++++ src/modules/avformat/consumer_avformat.c +@@ -237,10 +237,12 @@ static int consumer_start( mlt_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 >= ((54<<16)+(0<<8)+0) +- if ( ( codec->encode || codec->encode2 ) && codec->type == CODEC_TYPE_AUDIO ) ++#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0)) ++ if ( codec->encode2 && codec->type == CODEC_TYPE_AUDIO ) ++#elif 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 ) ++ if ( codec->encode && codec->type == CODEC_TYPE_AUDIO ) + #endif + { + snprintf( key, sizeof(key), "%d", mlt_properties_count( codecs ) ); +@@ -261,10 +263,12 @@ static int consumer_start( mlt_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 >= ((54<<16)+(0<<8)+0) +- if ( (codec->encode || codec->encode2) && codec->type == CODEC_TYPE_VIDEO ) ++#if (defined(FFUDIV) && LIBAVCODEC_VERSION_INT >= ((54<<16)+(56<<8)+100)) || (LIBAVCODEC_VERSION_INT >= ((54<<16)+(27<<8)+0)) ++ if ( codec->encode2 && codec->type == CODEC_TYPE_VIDEO ) ++#elif 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 ) ++ if ( codec->encode && codec->type == CODEC_TYPE_VIDEO ) + #endif + { + snprintf( key, sizeof(key), "%d", mlt_properties_count( codecs ) ); diff --git a/libmlt.changes b/libmlt.changes index 48b7174..c19752a 100644 --- a/libmlt.changes +++ b/libmlt.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Oct 1 13:28:16 UTC 2012 - reddwarf@opensuse.org + +- Add libmlt-0.8.2-ffmpeg1.patch to fix build with ffmpeg 1.0 + ------------------------------------------------------------------- Thu Aug 30 23:08:05 UTC 2012 - reddwarf@opensuse.org diff --git a/libmlt.spec b/libmlt.spec index 15a6ee2..6d1cc1c 100644 --- a/libmlt.spec +++ b/libmlt.spec @@ -40,6 +40,8 @@ Patch0: libmlt-0.8.0-optflags.patch Patch1: libmlt-0.8.2-vdpau.patch # PATCH-FIX-UPSTREAM libmlt-0.8.0-vdpau.patch sf#3555214 reddwarf@opensuse.org -- Install modules and data in versioned directories Patch2: libmlt-0.8.0-versioned_dirs.patch +# PATCH-FIX-UPSTREAM libmlt-0.8.2-ffmpeg1.patch reddwarf@opensuse.org -- Build with ffmpeg 1.0. Taken from upstream GIT. +Patch3: libmlt-0.8.2-ffmpeg1.patch BuildRequires: gcc-c++ BuildRequires: ladspa-devel BuildRequires: pkg-config @@ -190,6 +192,7 @@ This package is needed to use MLT from Python. %patch0 %patch1 %patch2 +%patch3 # To complement libmlt-0.8.0-vdpau.patch. # When vdpau support is not compiled it will break the code. Doesn't matter because the code will not be used anyway.