diff options
author | William Breathitt Gray <vilhelm.gray@gmail.com> | 2018-04-30 10:04:00 -0400 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2018-05-04 21:39:49 -0400 |
commit | 2543749bf52b23f6b1a875cd1ad337ae83c74609 (patch) | |
tree | 77fda69728c10fa12f55631cece860a93245ee59 /media-video/motion/files | |
parent | dev-tex/cjk-latex: use HTTPS (diff) | |
download | gentoo-2543749bf52b23f6b1a875cd1ad337ae83c74609.tar.gz gentoo-2543749bf52b23f6b1a875cd1ad337ae83c74609.tar.bz2 gentoo-2543749bf52b23f6b1a875cd1ad337ae83c74609.zip |
media-video/motion: Fix build errors with FFmpeg 4.0
Closes: https://bugs.gentoo.org/654416
Closes: https://github.com/gentoo/gentoo/pull/8220
Diffstat (limited to 'media-video/motion/files')
-rw-r--r-- | media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch b/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch new file mode 100644 index 000000000000..641d68a8d0c5 --- /dev/null +++ b/media-video/motion/files/4.1.1/Fix-build-errors-with-FFmpeg-4.0.patch @@ -0,0 +1,54 @@ +From 9a9e918ec819277c6c5c2f21b52dd63570e426a7 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 + +--- + ffmpeg.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/ffmpeg.c b/ffmpeg.c +index b2780bb..23644db 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; +@@ -538,7 +551,7 @@ static int ffmpeg_set_quality(struct ffmpeg *ffmpeg){ + /* 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 |= MY_CODEC_FLAG_QSCALE; + ffmpeg->ctx_codec->global_quality=ffmpeg->vbr; + } + } +@@ -663,7 +676,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.16.2 + |