1 |
commit: be8b675a01f799d3e203cadfc0e378b67024b4f9 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 5 11:54:53 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 5 11:55:06 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be8b675a |
7 |
|
8 |
media-plugins/vdr-osdpip: apply freebsd patch to build with ffmpeg3, bug #575100 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
.../files/vdr-osdpip-0.1.2-ffmpeg3.patch | 55 ++++++++++++++++++++++ |
13 |
.../vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild | 8 +--- |
14 |
2 files changed, 57 insertions(+), 6 deletions(-) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 00000000..e22428e |
19 |
--- /dev/null |
20 |
+++ b/media-plugins/vdr-osdpip/files/vdr-osdpip-0.1.2-ffmpeg3.patch |
21 |
@@ -0,0 +1,55 @@ |
22 |
+https://svnweb.freebsd.org/ports/head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3?view=markup |
23 |
+https://bugs.gentoo.org/show_bug.cgi?id=575100 |
24 |
+ |
25 |
+--- decoder.c.orig 2016-06-11 10:45:23.850303000 +0200 |
26 |
++++ decoder.c 2016-06-11 10:50:57.243181000 +0200 |
27 |
+@@ -28,7 +28,7 @@ |
28 |
+ |
29 |
+ int cDecoder::Open() |
30 |
+ { |
31 |
+- m_Codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO); |
32 |
++ m_Codec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO); |
33 |
+ if (!m_Codec) |
34 |
+ { |
35 |
+ printf("codec not found\n"); |
36 |
+@@ -40,8 +40,8 @@ |
37 |
+ printf("could not open codec\n"); |
38 |
+ return -1; |
39 |
+ } |
40 |
+- m_PicDecoded = avcodec_alloc_frame(); |
41 |
+- m_PicResample = avcodec_alloc_frame(); |
42 |
++ m_PicDecoded = av_frame_alloc(); |
43 |
++ m_PicResample = av_frame_alloc(); |
44 |
+ m_BufferResample = new unsigned char[400 * 300 * 4]; // size for RGBA32 |
45 |
+ #ifndef USE_SWSCALE |
46 |
+ m_PicConvert = avcodec_alloc_frame(); |
47 |
+@@ -99,7 +99,7 @@ |
48 |
+ AVPicture pic_crop; |
49 |
+ struct SwsContext * context; |
50 |
+ |
51 |
+- av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft); |
52 |
++ av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, AV_PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft); |
53 |
+ #ifdef FF_API_SWS_GETCONTEXT |
54 |
+ if (!(context = sws_alloc_context())) { |
55 |
+ printf("Error initializing scale context.\n"); |
56 |
+@@ -126,9 +126,9 @@ |
57 |
+ #else |
58 |
+ context = sws_getContext(m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), |
59 |
+ m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), |
60 |
+- PIX_FMT_YUV420P, |
61 |
++ AV_PIX_FMT_YUV420P, |
62 |
+ #ifdef USE_NEW_FFMPEG_HEADERS |
63 |
+- m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, |
64 |
++ m_Width, m_Height, ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P, |
65 |
+ #else |
66 |
+ m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, |
67 |
+ #endif |
68 |
+@@ -140,7 +140,7 @@ |
69 |
+ #endif |
70 |
+ avpicture_fill((AVPicture *) m_PicResample, m_BufferResample, |
71 |
+ #ifdef USE_NEW_FFMPEG_HEADERS |
72 |
+- ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, |
73 |
++ ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P, |
74 |
+ #else |
75 |
+ ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, |
76 |
+ #endif |
77 |
|
78 |
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 |
79 |
index 1165658..0421c81 100644 |
80 |
--- a/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild |
81 |
+++ b/media-plugins/vdr-osdpip/vdr-osdpip-0.1.2-r1.ebuild |
82 |
@@ -1,4 +1,4 @@ |
83 |
-# Copyright 1999-2015 Gentoo Foundation |
84 |
+# Copyright 1999-2016 Gentoo Foundation |
85 |
# Distributed under the terms of the GNU General Public License v2 |
86 |
# $Id$ |
87 |
|
88 |
@@ -30,9 +30,5 @@ src_prepare() { |
89 |
|
90 |
epatch "${FILESDIR}/${PN}-0.1.1-ffmpeg-1.patch" |
91 |
epatch "${FILESDIR}/${PN}-libav-9.patch" |
92 |
- |
93 |
- # tested with libav10/11, ffmpeg-2.5.4 |
94 |
- sed -e "s:CODEC_ID_MPEG2VIDEO:AV_CODEC_ID_MPEG2VIDEO:"\ |
95 |
- -e "s:avcodec_alloc_frame:av_frame_alloc:"\ |
96 |
- -i decoder.c |
97 |
+ epatch "${FILESDIR}/${PN}-0.1.2-ffmpeg3.patch" |
98 |
} |