summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2018-04-22 13:26:20 +0200
committerAlexis Ballier <aballier@gentoo.org>2018-04-22 13:26:20 +0200
commit9fe5bba535c6724ba3494323e76a0fe9175ff55e (patch)
tree9d1c9ae9bb7ac2eb7a67af5402cdf0ea186ca0ee /media-sound/moc
parentmedia-video/ffmpeg: add codec2 useflag (diff)
downloadgentoo-9fe5bba535c6724ba3494323e76a0fe9175ff55e.tar.gz
gentoo-9fe5bba535c6724ba3494323e76a0fe9175ff55e.tar.bz2
gentoo-9fe5bba535c6724ba3494323e76a0fe9175ff55e.zip
media-sound/moc: fix build with ffmpeg4
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'media-sound/moc')
-rw-r--r--media-sound/moc/files/ffmpeg4.patch33
-rw-r--r--media-sound/moc/moc-2.6_alpha3.ebuild3
2 files changed, 35 insertions, 1 deletions
diff --git a/media-sound/moc/files/ffmpeg4.patch b/media-sound/moc/files/ffmpeg4.patch
new file mode 100644
index 000000000000..28b688823470
--- /dev/null
+++ b/media-sound/moc/files/ffmpeg4.patch
@@ -0,0 +1,33 @@
+Index: moc-2.6-alpha3/decoder_plugins/ffmpeg/ffmpeg.c
+===================================================================
+--- moc-2.6-alpha3.orig/decoder_plugins/ffmpeg/ffmpeg.c
++++ moc-2.6-alpha3/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -697,7 +697,7 @@ static void *ffmpeg_open_internal (struc
+ * FFmpeg/LibAV in use. For some versions this will be caught in
+ * *_find_stream_info() above and misreported as an unfound codec
+ * parameters error. */
+- if (data->codec->capabilities & CODEC_CAP_EXPERIMENTAL) {
++ if (data->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) {
+ decoder_error (&data->error, ERROR_FATAL, 0,
+ "The codec is experimental and may damage MOC: %s",
+ data->codec->name);
+@@ -705,8 +705,8 @@ static void *ffmpeg_open_internal (struc
+ }
+
+ set_downmixing (data);
+- if (data->codec->capabilities & CODEC_CAP_TRUNCATED)
+- data->enc->flags |= CODEC_FLAG_TRUNCATED;
++ if (data->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++ data->enc->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+ if (avcodec_open2 (data->enc, data->codec, NULL) < 0)
+ {
+@@ -725,7 +725,7 @@ static void *ffmpeg_open_internal (struc
+
+ data->sample_width = sfmt_Bps (data->fmt);
+
+- if (data->codec->capabilities & CODEC_CAP_DELAY)
++ if (data->codec->capabilities & AV_CODEC_CAP_DELAY)
+ data->delay = true;
+ data->seek_broken = is_seek_broken (data);
+ data->timing_broken = is_timing_broken (data->ic);
diff --git a/media-sound/moc/moc-2.6_alpha3.ebuild b/media-sound/moc/moc-2.6_alpha3.ebuild
index d68ba88aa230..b2d3b3643bd9 100644
--- a/media-sound/moc/moc-2.6_alpha3.ebuild
+++ b/media-sound/moc/moc-2.6_alpha3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -57,6 +57,7 @@ DEPEND="${RDEPEND}
"
S=${WORKDIR}/${MY_P}
+PATCHES=( "${FILESDIR}/ffmpeg4.patch" )
src_configure() {
local myconf=(