diff options
Diffstat (limited to 'media-tv/xbmc/files/xbmc-11.0-libav-r1.patch')
-rw-r--r-- | media-tv/xbmc/files/xbmc-11.0-libav-r1.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch b/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch new file mode 100644 index 000000000000..84a215a72684 --- /dev/null +++ b/media-tv/xbmc/files/xbmc-11.0-libav-r1.patch @@ -0,0 +1,71 @@ +Patch rebased to current patches backported from upstream by Alexis Ballier. +Based on the previous patch, submitted upstream but not merged it seems: + +https://bugs.gentoo.org/406215 + +From c74abc298e2075f431d9fa700fcfc5e1bbbddf22 Mon Sep 17 00:00:00 2001 +From: Tomas Chvatal <tchvatal@suse.cz> +Date: Fri, 23 Mar 2012 12:08:53 +0100 +Subject: [PATCH 2/2] Add support for libav api as it sligthly differ. + +The libav use micro version as 0 +The ffmpeg use the micro version as 100+ + +Simply check if the variable is defined then it is not libav. +Index: xbmc-11.0/lib/DllAvFilter.h +=================================================================== +--- xbmc-11.0.orig/lib/DllAvFilter.h ++++ xbmc-11.0/lib/DllAvFilter.h +@@ -45,7 +45,11 @@ extern "C" { + #if (defined HAVE_LIBAVFILTER_AVFILTER_H) + #include <libavfilter/avfiltergraph.h> + #include <libavfilter/buffersink.h> +- #include <libavfilter/avcodec.h> ++ #if LIBAVFILTER_VERSION_MICRO < 50 // Libav ++ #include <libavfilter/vsrc_buffer.h> ++ #else ++ #include <libavfilter/avcodec.h> ++ #endif + #elif (defined HAVE_FFMPEG_AVFILTER_H) + #include <ffmpeg/avfiltergraph.h> + #include <ffmpeg/buffersink.h> +@@ -75,7 +79,11 @@ public: + virtual int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut **inputs, AVFilterInOut **outputs, void *log_ctx)=0; + virtual int avfilter_graph_config(AVFilterGraph *graphctx, void *log_ctx)=0; + #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0) ++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav ++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0; ++#else + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; ++#endif + #else + virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; + #endif +@@ -135,7 +143,11 @@ public: + return ::avfilter_graph_config(graphctx, log_ctx); + } + #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0) ++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav ++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, pts, pixel_aspect); } ++#else + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); } ++#endif + #else + virtual int av_buffersrc_add_frame(AVFilterContext *buffer_filter, AVFrame* frame, int flags) { return ::av_buffersrc_add_frame(buffer_filter, frame, flags); } + #endif +Index: xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +=================================================================== +--- xbmc-11.0.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp ++++ xbmc-11.0/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +@@ -833,7 +833,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess( + if (frame) + { + #if LIBAVFILTER_VERSION_INT < AV_VERSION_INT(3,0,0) ++#if LIBAVFILTER_VERSION_MICRO < 50 // Libav ++ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio); ++#else + result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0); ++#endif + #else + result = m_dllAvFilter.av_buffersrc_add_frame(m_pFilterIn, frame, 0); + #endif |