diff options
author | BlackNoxis <steven.darklight@gmail.com> | 2014-12-31 22:34:20 +0200 |
---|---|---|
committer | BlackNoxis <steven.darklight@gmail.com> | 2014-12-31 22:34:20 +0200 |
commit | 2010db343b5e432cc97eefdab742cd6eb9cfc897 (patch) | |
tree | fa5b4f0b4a601ccc89e8cad2d6b13823ed9eeb12 /media-tv/xbmc/files/xbmc-11.0-libav.patch | |
parent | d0644431947c183f4f14d791ec65ca644968ffd5 (diff) |
Added few modifications from upstream
Diffstat (limited to 'media-tv/xbmc/files/xbmc-11.0-libav.patch')
-rw-r--r-- | media-tv/xbmc/files/xbmc-11.0-libav.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/media-tv/xbmc/files/xbmc-11.0-libav.patch b/media-tv/xbmc/files/xbmc-11.0-libav.patch new file mode 100644 index 00000000..0aaa1ce4 --- /dev/null +++ b/media-tv/xbmc/files/xbmc-11.0-libav.patch @@ -0,0 +1,72 @@ +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. +--- + lib/DllAvFilter.h | 10 +++++++++- + .../DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 4 ++++ + 2 files changed, 13 insertions(+), 1 deletions(-) + +diff --git a/lib/DllAvFilter.h b/lib/DllAvFilter.h +index 302e35c..827746e 100644 +--- a/lib/DllAvFilter.h ++++ b/lib/DllAvFilter.h +@@ -48,7 +48,7 @@ extern "C" { + #endif + /* for av_vsrc_buffer_add_frame */ + #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,8,0) +- #include <libavfilter/avcodec.h> ++ #include <libavfilter/vsrc_buffer.h> + #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) + int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, + AVFrame *frame); +@@ -83,7 +83,11 @@ public: + virtual int avfilter_poll_frame(AVFilterLink *link)=0; + virtual int avfilter_request_frame(AVFilterLink *link)=0; + #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) ++#if LIBAVFILTER_VERSION_MICRO + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags)=0; ++#else ++ virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int64_t pts, AVRational pixel_aspect)=0; ++#endif + #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame)=0; + #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) +@@ -172,7 +176,11 @@ public: + virtual int avfilter_poll_frame(AVFilterLink *link) { return ::avfilter_poll_frame(link); } + virtual int avfilter_request_frame(AVFilterLink *link) { return ::avfilter_request_frame(link); } + #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) ++#if LIBAVFILTER_VERSION_MICRO + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, int flags) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame, flags); } ++#else ++ 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); } ++#endif + #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) + virtual int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame) { return ::av_vsrc_buffer_add_frame(buffer_filter, frame); } + #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) +diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +index b4e1451..4e5eedf 100644 +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +@@ -814,7 +814,11 @@ int CDVDVideoCodecFFmpeg::FilterProcess(AVFrame* frame) + if (frame) + { + #if LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,13,0) ++#if LIBAVFILTER_VERSION_MICRO + result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, 0); ++#else ++ result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame, frame->pts, m_pCodecContext->sample_aspect_ratio); ++#endif + #elif LIBAVFILTER_VERSION_INT >= AV_VERSION_INT(2,7,0) + result = m_dllAvFilter.av_vsrc_buffer_add_frame(m_pFilterIn, frame); + #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53,3,0) +-- +1.7.3.4 + |