- Add libmlt-0.8.2-ffmpeg1.patch to fix build with ffmpeg 1.0

OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libmlt?expand=0&rev=21
This commit is contained in:
Cristian Morales Vega 2012-10-01 12:27:36 +00:00 committed by Git OBS Bridge
parent 25c214038d
commit a1924a0d7d
3 changed files with 44 additions and 0 deletions

View File

@ -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 ) );

View File

@ -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

View File

@ -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.