All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/motion: fix build with FFmpeg 4.0
@ 2018-09-08 21:24 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2018-09-08 21:24 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=0b1794cb43ab2c67ea619b69717f6499dcd410ee
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 .../0001-Fix-build-errors-with-FFmpeg-4.0.patch    | 58 ++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch
new file mode 100644
index 0000000000..e738809a74
--- /dev/null
+++ b/package/motion/0001-Fix-build-errors-with-FFmpeg-4.0.patch
@@ -0,0 +1,58 @@
+From 9b93a417e37e1f0fef58d1582a7e98e4c05d3b42 Mon Sep 17 00:00:00 2001
+From: James Cowgill <jcowgill@users.noreply.github.com>
+Date: Sun, 25 Feb 2018 20:13:57 +0000
+Subject: [PATCH] Fix build errors with FFmpeg 4.0
+
+Backported from upstream commit
+https://github.com/Motion-Project/motion/commit/9b93a417e37e1f0fef58d1582a7e98e4c05d3b42
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+---
+ ffmpeg.c | 19 ++++++++++++++++---
+ 1 file changed, 16 insertions(+), 3 deletions(-)
+
+diff --git a/ffmpeg.c b/ffmpeg.c
+index 1e6cdf6..4299ba3 100644
+--- a/ffmpeg.c
++++ b/ffmpeg.c
+@@ -67,6 +67,19 @@
+ 
+ #endif
+ 
++/*********************************************/
++#if (LIBAVCODEC_VERSION_MAJOR >= 57)
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        AV_CODEC_FLAG_QSCALE
++
++#else
++
++#define MY_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
++#define MY_CODEC_FLAG_QSCALE        CODEC_FLAG_QSCALE
++
++#endif
++
+ /*********************************************/
+ AVFrame *my_frame_alloc(void){
+     AVFrame *pic;
+@@ -548,7 +561,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){
+         /* The selection of 8000 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 |= MY_CODEC_FLAG_QSCALE;
+             ffmpeg->ctx_codec->global_quality=ffmpeg->vbr;
+         }
+     }
+@@ -673,7 +686,7 @@ static int ffmpeg_set_codec(struct ffmpeg *ffmpeg){
+       ffmpeg->ctx_codec->strict_std_compliance = -2;
+       ffmpeg->ctx_codec->level = 3;
+     }
+-    ffmpeg->ctx_codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
++    ffmpeg->ctx_codec->flags |= MY_CODEC_FLAG_GLOBAL_HEADER;
+ 
+     retcd = ffmpeg_set_quality(ffmpeg);
+     if (retcd < 0){
+-- 
+2.18.0
+

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-08 21:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08 21:24 [Buildroot] [git commit] package/motion: fix build with FFmpeg 4.0 Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.