forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: https://bugs.gentoo.org/654172 Package-Manager: Portage-2.3.36, Repoman-2.3.9
- Loading branch information
Showing
4 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
From 8f2545886ce3be8f1b1229bddcfa5af3216110d3 Mon Sep 17 00:00:00 2001 | ||
From: Franz Brausse <[email protected]> | ||
Date: Sun, 6 May 2018 13:38:09 +0200 | ||
Subject: operations/external/ff-save: ffmpeg-4.0 compat; fixes #795625 | ||
|
||
--- | ||
operations/external/ff-save.c | 11 ++++++++++- | ||
1 file changed, 10 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c | ||
index 90b6162..e7edd3e 100644 | ||
--- a/operations/external/ff-save.c | ||
+++ b/operations/external/ff-save.c | ||
@@ -88,6 +88,11 @@ property_int (me_subpel_quality, _("me-subpel-quality"), 0) | ||
#include <libavutil/opt.h> | ||
#include <libswscale/swscale.h> | ||
|
||
+/* remove if libavcodec_required_version is changed to > 56.41.100 */ | ||
+#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(56,41,100) | ||
+# define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER | ||
+#endif | ||
+ | ||
typedef struct | ||
{ | ||
gdouble frame; | ||
@@ -290,7 +295,7 @@ add_audio_stream (GeglProperties *o, AVFormatContext * oc, int codec_id) | ||
c->codec_type = AVMEDIA_TYPE_AUDIO; | ||
|
||
if (oc->oformat->flags & AVFMT_GLOBALHEADER) | ||
- c->flags |= CODEC_FLAG_GLOBAL_HEADER; | ||
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | ||
|
||
return st; | ||
} | ||
@@ -699,7 +704,9 @@ open_video (GeglProperties *o, AVFormatContext * oc, AVStream * st) | ||
} | ||
|
||
p->video_outbuf = NULL; | ||
+#if (LIBAVFORMAT_VERSION_MAJOR < 58) /* AVFMT_RAWPICTURE got removed from ffmpeg: "not used anymore" */ | ||
if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) | ||
+#endif | ||
{ | ||
/* allocate output buffer, 1 mb / frame, might fail for some codecs on UHD - but works for now */ | ||
p->video_outbuf_size = 1024 * 1024; | ||
@@ -803,6 +810,7 @@ write_video_frame (GeglProperties *o, | ||
picture_ptr = p->picture; | ||
picture_ptr->pts = p->frame_count; | ||
|
||
+ #if (LIBAVFORMAT_VERSION_MAJOR < 58) /* AVFMT_RAWPICTURE got removed from ffmpeg: "not used anymore" */ | ||
if (oc->oformat->flags & AVFMT_RAWPICTURE) | ||
{ | ||
/* raw video case. The API will change slightly in the near | ||
@@ -821,6 +829,7 @@ write_video_frame (GeglProperties *o, | ||
ret = av_write_frame (oc, &pkt); | ||
} | ||
else | ||
+#endif | ||
{ | ||
/* encode the image */ | ||
AVPacket pkt2; | ||
-- | ||
cgit v0.12 | ||
|
25 changes: 25 additions & 0 deletions
25
media-libs/gegl/files/gegl-0.4.0-ffmpeg-4-0-compat-2.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 2896800b5e7d0c656710c70fdea57098032f3ccc Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <[email protected]> | ||
Date: Sun, 6 May 2018 15:09:03 +0200 | ||
Subject: ff-save: update another occurance of CODEC_FLAG_GLOBAL_HEADER | ||
|
||
--- | ||
operations/external/ff-save.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c | ||
index 1edac31..f30bf10 100644 | ||
--- a/operations/external/ff-save.c | ||
+++ b/operations/external/ff-save.c | ||
@@ -638,7 +638,7 @@ add_video_stream (GeglProperties *o, AVFormatContext * oc, int codec_id) | ||
#endif | ||
|
||
if (oc->oformat->flags & AVFMT_GLOBALHEADER) | ||
- c->flags |= CODEC_FLAG_GLOBAL_HEADER; | ||
+ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER; | ||
|
||
return st; | ||
} | ||
-- | ||
cgit v0.12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters