summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--media-plugins/vdr-osdpip/files/vdr-osdpip-0.1.2-ffmpeg3.patch55
-rw-r--r--media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild8
2 files changed, 57 insertions, 6 deletions
diff --git a/media-plugins/vdr-osdpip/files/vdr-osdpip-0.1.2-ffmpeg3.patch b/media-plugins/vdr-osdpip/files/vdr-osdpip-0.1.2-ffmpeg3.patch
new file mode 100644
index 000000000000..e22428e49f71
--- /dev/null
+++ b/media-plugins/vdr-osdpip/files/vdr-osdpip-0.1.2-ffmpeg3.patch
@@ -0,0 +1,55 @@
+https://svnweb.freebsd.org/ports/head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3?view=markup
+https://bugs.gentoo.org/show_bug.cgi?id=575100
+
+--- decoder.c.orig 2016-06-11 10:45:23.850303000 +0200
++++ decoder.c 2016-06-11 10:50:57.243181000 +0200
+@@ -28,7 +28,7 @@
+
+ int cDecoder::Open()
+ {
+- m_Codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO);
++ m_Codec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO);
+ if (!m_Codec)
+ {
+ printf("codec not found\n");
+@@ -40,8 +40,8 @@
+ printf("could not open codec\n");
+ return -1;
+ }
+- m_PicDecoded = avcodec_alloc_frame();
+- m_PicResample = avcodec_alloc_frame();
++ m_PicDecoded = av_frame_alloc();
++ m_PicResample = av_frame_alloc();
+ m_BufferResample = new unsigned char[400 * 300 * 4]; // size for RGBA32
+ #ifndef USE_SWSCALE
+ m_PicConvert = avcodec_alloc_frame();
+@@ -99,7 +99,7 @@
+ AVPicture pic_crop;
+ struct SwsContext * context;
+
+- av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft);
++ av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, AV_PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft);
+ #ifdef FF_API_SWS_GETCONTEXT
+ if (!(context = sws_alloc_context())) {
+ printf("Error initializing scale context.\n");
+@@ -126,9 +126,9 @@
+ #else
+ context = sws_getContext(m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight),
+ m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom),
+- PIX_FMT_YUV420P,
++ AV_PIX_FMT_YUV420P,
+ #ifdef USE_NEW_FFMPEG_HEADERS
+- m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P,
++ m_Width, m_Height, ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P,
+ #else
+ m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P,
+ #endif
+@@ -140,7 +140,7 @@
+ #endif
+ avpicture_fill((AVPicture *) m_PicResample, m_BufferResample,
+ #ifdef USE_NEW_FFMPEG_HEADERS
+- ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P,
++ ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P,
+ #else
+ ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P,
+ #endif
diff --git a/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild b/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild
index 116565863e4a..0421c8126ae5 100644
--- a/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild
+++ b/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -30,9 +30,5 @@ src_prepare() {
epatch "${FILESDIR}/${PN}-0.1.1-ffmpeg-1.patch"
epatch "${FILESDIR}/${PN}-libav-9.patch"
-
- # tested with libav10/11, ffmpeg-2.5.4
- sed -e "s:CODEC_ID_MPEG2VIDEO:AV_CODEC_ID_MPEG2VIDEO:"\
- -e "s:avcodec_alloc_frame:av_frame_alloc:"\
- -i decoder.c
+ epatch "${FILESDIR}/${PN}-0.1.2-ffmpeg3.patch"
}