commit 5c6b3605e8c8d400d35b8def2606047248d8c790
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Fri Jan 19 10:49:27 2018 +0000
fix build with ffmpeg-3.5
ffmpeg35_buildfix.patch | 32 ++++++++++++++++++++++++++++++++
moc.spec | 2 ++
2 files changed, 34 insertions(+)
---
diff --git a/ffmpeg35_buildfix.patch b/ffmpeg35_buildfix.patch
new file mode 100644
index 0000000..2a632ef
--- /dev/null
+++ b/ffmpeg35_buildfix.patch
@@ -0,0 +1,32 @@
+--- a/decoder_plugins/ffmpeg/ffmpeg.c
++++ b/decoder_plugins/ffmpeg/ffmpeg.c
+@@ -697,7 +697,7 @@
+ * 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 @@
+ }
+
+ 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 @@
+
+ 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/moc.spec b/moc.spec
index c9244a3..2aa2790 100644
--- a/moc.spec
+++ b/moc.spec
@@ -20,6 +20,7 @@ URL:
http://moc.daper.net
## tar -cvzf moc-git%%{checkout}.tar.gz trunk
#Source0: moc-git%%{checkout}.tar.gz
Source0:
http://ftp.daper.net/pub/soft/moc/unstable/moc-%{version}-alpha3.tar.xz
+Patch0: ffmpeg35_buildfix.patch
BuildRequires: pkgconfig(ncurses)
BuildRequires: pkgconfig(alsa)
@@ -58,6 +59,7 @@ files in this directory beginning from the chosen file.
%prep
%setup -q -n moc-%{version}-alpha3
+%patch0 -p1
%build
autoreconf -ivf