From d4c5240fd3fa013221cfcec18b2eccb555dd42230b1e479a3f7dd3330e749026 Mon Sep 17 00:00:00 2001 From: Cristian Morales Vega Date: Sun, 5 Aug 2012 02:08:35 +0000 Subject: [PATCH] - Fix VDPAU support OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libmlt?expand=0&rev=7 --- libmlt-0.8.0-vdpau.patch | 32 ++++++++++++++++++++++++++++++++ libmlt.changes | 1 + libmlt.spec | 5 +++++ 3 files changed, 38 insertions(+) create mode 100644 libmlt-0.8.0-vdpau.patch diff --git a/libmlt-0.8.0-vdpau.patch b/libmlt-0.8.0-vdpau.patch new file mode 100644 index 0000000..00a7a89 --- /dev/null +++ b/libmlt-0.8.0-vdpau.patch @@ -0,0 +1,32 @@ +Index: src/modules/avformat/vdpau.c +=================================================================== +--- src/modules/avformat/vdpau.c.orig ++++ src/modules/avformat/vdpau.c +@@ -70,11 +70,7 @@ static int vdpau_init( producer_avformat + if ( !vdpau_init_done ) + { + int flags = RTLD_NOW; +- object = dlopen( "/usr/lib64/libvdpau.so", flags ); +- if ( !object ) +- object = dlopen( "/usr/lib/libvdpau.so", flags ); +- if ( !object ) +- object = dlopen( "/usr/local/lib/libvdpau.so", flags ); ++ object = dlopen( "libvdpau.so", flags ); + if ( object ) + vdpau_device_create_x11 = dlsym( object, "vdp_device_create_x11" ); + else +@@ -152,14 +148,12 @@ static int vdpau_get_buffer( AVCodecCont + frame->reordered_opaque = codec_context->reordered_opaque; + if ( frame->reference ) + { +- frame->age = self->vdpau->ip_age[0]; + self->vdpau->ip_age[0] = self->vdpau->ip_age[1] + 1; + self->vdpau->ip_age[1] = 1; + self->vdpau->b_age++; + } + else + { +- frame->age = self->vdpau->b_age; + self->vdpau->ip_age[0] ++; + self->vdpau->ip_age[1] ++; + self->vdpau->b_age = 1; diff --git a/libmlt.changes b/libmlt.changes index c3e8b34..deb0919 100644 --- a/libmlt.changes +++ b/libmlt.changes @@ -3,6 +3,7 @@ Sat Aug 4 17:26:43 UTC 2012 - reddwarf@opensuse.org - Compile the python binding with %{optflags}, getting debug information on the way. +- Fix VDPAU support ------------------------------------------------------------------- Mon Jun 18 16:33:36 UTC 2012 - reddwarf@opensuse.org diff --git a/libmlt.spec b/libmlt.spec index 907868c..c7a38bd 100644 --- a/libmlt.spec +++ b/libmlt.spec @@ -34,7 +34,10 @@ License: GPL-3.0+ Group: System/Libraries Url: http://%{_name}.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/%{_name}/%{_name}/%{_name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM libmlt-0.8.0-optflags.patch sf#3554425 reddwarf@opensuse.org -- Build the python binding with %{optflags} Patch0: libmlt-0.8.0-optflags.patch +# PATCH-FIX-UPSTREAM libmlt-0.8.0-vdpau.patch http://permalink.gmane.org/gmane.comp.video.mlt.devel/2392 reddwarf@opensuse.org -- Fix build with VDPAU support +Patch1: libmlt-0.8.0-vdpau.patch BuildRequires: gcc-c++ BuildRequires: ladspa-devel BuildRequires: pkg-config @@ -63,6 +66,7 @@ BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libswscale) +BuildRequires: pkgconfig(vdpau) # VDPAU support requires it BuildRequires: pkgconfig(x11) %endif @@ -176,6 +180,7 @@ This package is needed to use MLT from Python. %prep %setup -q -n %{_name}-%{version} %patch0 +%patch1 %build %configure --enable-gpl --enable-gpl3 \