commit 2d9898fcaa107dde6a0a42afd9e94334a0935bfb
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Thu Jan 18 09:22:45 2018 +0000
fix build with ffmpeg-3.5
ffmpeg35_buildfix.patch | 21 +++++++++++++++++++++
motion.spec | 3 ++-
2 files changed, 23 insertions(+), 1 deletion(-)
---
diff --git a/ffmpeg35_buildfix.patch b/ffmpeg35_buildfix.patch
new file mode 100644
index 0000000..63fbdb8
--- /dev/null
+++ b/ffmpeg35_buildfix.patch
@@ -0,0 +1,21 @@
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -538,7 +538,7 @@
+ /* The selection of 8000 in the else is a subjective number based upon viewing
output files */
+ if (ffmpeg->vbr > 0){
+ ffmpeg->vbr
=(int)(((100-ffmpeg->vbr)*(100-ffmpeg->vbr)*(100-ffmpeg->vbr) * 8000) / 1000000)
+ 1;
+- ffmpeg->ctx_codec->flags |= CODEC_FLAG_QSCALE;
++ ffmpeg->ctx_codec->flags |= AV_CODEC_FLAG_QSCALE;
+ ffmpeg->ctx_codec->global_quality=ffmpeg->vbr;
+ }
+ }
+@@ -663,7 +663,7 @@
+ ffmpeg->ctx_codec->strict_std_compliance = -2;
+ ffmpeg->ctx_codec->level = 3;
+ }
+- ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ ffmpeg->ctx_codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ retcd = ffmpeg_set_quality(ffmpeg);
+ if (retcd < 0){
+
diff --git a/motion.spec b/motion.spec
index 59ee1e1..5d60a06 100644
--- a/motion.spec
+++ b/motion.spec
@@ -33,6 +33,7 @@ URL:
https://motion-project.github.io/
Source0:
https://github.com/Motion-Project/motion/archive/release-%{nextver}.tar.g...
Source1: motion.service
Source2: motion.tmpfiles
+Patch0: ffmpeg35_buildfix.patch
BuildRequires: libjpeg-devel
Buildrequires: zlib-devel
@@ -63,7 +64,7 @@ with a rather small footprint. This version is built with ffmpeg support
but
without MySQL and PostgreSQL support.
%prep
-%setup -q -n %{name}-release-%{nextver}
+%autosetup -p1 -n %{name}-release-%{nextver}
autoreconf
%build