Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/gegl/, media-libs/gegl/files/
Date: Sun, 13 May 2018 17:31:02
Message-Id: 1526232624.2ce460484a2841634b71f5df4335ba3eca4f709a.sping@gentoo
1 commit: 2ce460484a2841634b71f5df4335ba3eca4f709a
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 13 17:28:19 2018 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sun May 13 17:30:24 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ce46048
7
8 media-libs/gegl: Support ffmpeg 4.0
9
10 Closes: https://bugs.gentoo.org/654172
11 Package-Manager: Portage-2.3.36, Repoman-2.3.9
12
13 .../files/gegl-0.4.0-ffmpeg-4-0-compat-1.patch | 63 ++++++++++++++++++++++
14 .../files/gegl-0.4.0-ffmpeg-4-0-compat-2.patch | 25 +++++++++
15 media-libs/gegl/gegl-0.3.34.ebuild | 2 +
16 media-libs/gegl/gegl-0.4.0-r1.ebuild | 2 +
17 4 files changed, 92 insertions(+)
18
19 diff --git a/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-1.patch b/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-1.patch
20 new file mode 100644
21 index 00000000000..fc8027f08ae
22 --- /dev/null
23 +++ b/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-1.patch
24 @@ -0,0 +1,63 @@
25 +From 8f2545886ce3be8f1b1229bddcfa5af3216110d3 Mon Sep 17 00:00:00 2001
26 +From: Franz Brausse <brausse@××××××××××××××××××××.de>
27 +Date: Sun, 6 May 2018 13:38:09 +0200
28 +Subject: operations/external/ff-save: ffmpeg-4.0 compat; fixes #795625
29 +
30 +---
31 + operations/external/ff-save.c | 11 ++++++++++-
32 + 1 file changed, 10 insertions(+), 1 deletion(-)
33 +
34 +diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
35 +index 90b6162..e7edd3e 100644
36 +--- a/operations/external/ff-save.c
37 ++++ b/operations/external/ff-save.c
38 +@@ -88,6 +88,11 @@ property_int (me_subpel_quality, _("me-subpel-quality"), 0)
39 + #include <libavutil/opt.h>
40 + #include <libswscale/swscale.h>
41 +
42 ++/* remove if libavcodec_required_version is changed to > 56.41.100 */
43 ++#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(56,41,100)
44 ++# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
45 ++#endif
46 ++
47 + typedef struct
48 + {
49 + gdouble frame;
50 +@@ -290,7 +295,7 @@ add_audio_stream (GeglProperties *o, AVFormatContext * oc, int codec_id)
51 + c->codec_type = AVMEDIA_TYPE_AUDIO;
52 +
53 + if (oc->oformat->flags & AVFMT_GLOBALHEADER)
54 +- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
55 ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
56 +
57 + return st;
58 + }
59 +@@ -699,7 +704,9 @@ open_video (GeglProperties *o, AVFormatContext * oc, AVStream * st)
60 + }
61 +
62 + p->video_outbuf = NULL;
63 ++#if (LIBAVFORMAT_VERSION_MAJOR < 58) /* AVFMT_RAWPICTURE got removed from ffmpeg: "not used anymore" */
64 + if (!(oc->oformat->flags & AVFMT_RAWPICTURE))
65 ++#endif
66 + {
67 + /* allocate output buffer, 1 mb / frame, might fail for some codecs on UHD - but works for now */
68 + p->video_outbuf_size = 1024 * 1024;
69 +@@ -803,6 +810,7 @@ write_video_frame (GeglProperties *o,
70 + picture_ptr = p->picture;
71 + picture_ptr->pts = p->frame_count;
72 +
73 ++ #if (LIBAVFORMAT_VERSION_MAJOR < 58) /* AVFMT_RAWPICTURE got removed from ffmpeg: "not used anymore" */
74 + if (oc->oformat->flags & AVFMT_RAWPICTURE)
75 + {
76 + /* raw video case. The API will change slightly in the near
77 +@@ -821,6 +829,7 @@ write_video_frame (GeglProperties *o,
78 + ret = av_write_frame (oc, &pkt);
79 + }
80 + else
81 ++#endif
82 + {
83 + /* encode the image */
84 + AVPacket pkt2;
85 +--
86 +cgit v0.12
87 +
88
89 diff --git a/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-2.patch b/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-2.patch
90 new file mode 100644
91 index 00000000000..260ff3b2c1a
92 --- /dev/null
93 +++ b/media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-2.patch
94 @@ -0,0 +1,25 @@
95 +From 2896800b5e7d0c656710c70fdea57098032f3ccc Mon Sep 17 00:00:00 2001
96 +From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <pippin@××××.org>
97 +Date: Sun, 6 May 2018 15:09:03 +0200
98 +Subject: ff-save: update another occurance of CODEC_FLAG_GLOBAL_HEADER
99 +
100 +---
101 + operations/external/ff-save.c | 2 +-
102 + 1 file changed, 1 insertion(+), 1 deletion(-)
103 +
104 +diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c
105 +index 1edac31..f30bf10 100644
106 +--- a/operations/external/ff-save.c
107 ++++ b/operations/external/ff-save.c
108 +@@ -638,7 +638,7 @@ add_video_stream (GeglProperties *o, AVFormatContext * oc, int codec_id)
109 + #endif
110 +
111 + if (oc->oformat->flags & AVFMT_GLOBALHEADER)
112 +- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
113 ++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
114 +
115 + return st;
116 + }
117 +--
118 +cgit v0.12
119 +
120
121 diff --git a/media-libs/gegl/gegl-0.3.34.ebuild b/media-libs/gegl/gegl-0.3.34.ebuild
122 index 075874901a6..90e2075cd1c 100644
123 --- a/media-libs/gegl/gegl-0.3.34.ebuild
124 +++ b/media-libs/gegl/gegl-0.3.34.ebuild
125 @@ -77,6 +77,8 @@ pkg_setup() {
126
127 PATCHES=(
128 "${FILESDIR}"/${PN}-0.3.12-failing-tests.patch
129 + "${FILESDIR}"/${PN}-0.4.0-ffmpeg-4-0-compat-1.patch # bug 654172
130 + "${FILESDIR}"/${PN}-0.4.0-ffmpeg-4-0-compat-2.patch # bug 654172
131 )
132
133 src_prepare() {
134
135 diff --git a/media-libs/gegl/gegl-0.4.0-r1.ebuild b/media-libs/gegl/gegl-0.4.0-r1.ebuild
136 index 79a293b0beb..36f2afb95aa 100644
137 --- a/media-libs/gegl/gegl-0.4.0-r1.ebuild
138 +++ b/media-libs/gegl/gegl-0.4.0-r1.ebuild
139 @@ -78,6 +78,8 @@ pkg_setup() {
140
141 PATCHES=(
142 "${FILESDIR}"/${PN}-0.3.12-failing-tests.patch
143 + "${FILESDIR}"/${P}-ffmpeg-4-0-compat-1.patch # bug 654172
144 + "${FILESDIR}"/${P}-ffmpeg-4-0-compat-2.patch # bug 654172
145 )
146
147 src_prepare() {