Source: xbmc
Version: 2:13.2+dfsg1-2

Dear Maintainer,

the recent vdpau changes [1], precisely the use of av_vdpau_alloc_context, make xbmc fail to link, when compiled against ffmpeg.

The problem is that libavcodec is a C library, while xbmc is a C++ program and therefore the function symbols differ.
Thus the include of any C library has to be guarded by 'extern "C"'.

Attached patch fixes this.
(This change is already made in the libav_hacks.h header and thus building against libav works.)

Best regards,
Andreas

1: https://anonscm.debian.org/cgit/pkg-multimedia/xbmc.git/tree/debian/patches/0008-Setup-AVVDPAUContext-with-API-calls-instead-of-using.patch
diff --git a/debian/patches/11-fix-vdpau-include.patch b/debian/patches/11-fix-vdpau-include.patch
new file mode 100644
index 0000000..8b624a2
--- /dev/null
+++ b/debian/patches/11-fix-vdpau-include.patch
@@ -0,0 +1,39 @@
+Description: Include libavcodec/vdpau.h as C library
+ This fixes a linking failure with av_vdpau_alloc_context.
+
+Author: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
+Last-Update: <2014-10-24>
+
+--- xbmc-13.2+dfsg1.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
++++ xbmc-13.2+dfsg1/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
+@@ -43,7 +43,6 @@
+ #include "DllAvUtil.h"
+ #include "DVDVideoCodec.h"
+ #include "DVDVideoCodecFFmpeg.h"
+-#include "libavcodec/vdpau.h"
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #define GLX_GLXEXT_PROTOTYPES
+@@ -52,7 +51,6 @@
+ #include "DllAvUtil.h"
+ #include "DVDVideoCodec.h"
+ #include "DVDVideoCodecFFmpeg.h"
+-#include "libavcodec/vdpau.h"
+ #include "threads/CriticalSection.h"
+ #include "threads/SharedSection.h"
+ #include "settings/VideoSettings.h"
+@@ -62,6 +60,14 @@
+ #include "utils/ActorProtocol.h"
+ #include <list>
+ 
++#ifdef __cplusplus
++extern "C" {
++#endif
++#include "libavcodec/vdpau.h"
++#ifdef __cplusplus
++}
++#endif
++
+ using namespace Actor;
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 42bb414..ac4eef8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,4 +13,4 @@
 08-armel.patch
 09-use-correct-ftgl.h
 10-configure-all-arches.patch
-
+11-fix-vdpau-include.patch

Reply via email to