commit:     a3c39bde4dec956f60f9b14037451cb1d5011c63
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 25 13:28:55 2025 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Oct 25 13:30:09 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3c39bde

media-video/x264-encoder: backport build fix for ffmpeg-8

This may be due for a new snapshot soon, but not planning to look
at that and the backport is very trivial meanwhile.

Closes: https://bugs.gentoo.org/965077
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../files/x264-encoder-0.0.20240513-ffmpeg8.patch  | 22 ++++++++++++++++++++++
 .../x264-encoder/x264-encoder-0.0.20240513.ebuild  |  6 +++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git 
a/media-video/x264-encoder/files/x264-encoder-0.0.20240513-ffmpeg8.patch 
b/media-video/x264-encoder/files/x264-encoder-0.0.20240513-ffmpeg8.patch
new file mode 100644
index 000000000000..5cda8e524bd4
--- /dev/null
+++ b/media-video/x264-encoder/files/x264-encoder-0.0.20240513-ffmpeg8.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/965077
+https://code.videolan.org/videolan/x264/-/commit/32c3b8011
+--- a/input/lavf.c
++++ b/input/lavf.c
+@@ -34,4 +34,5 @@
+ #include <libavutil/mem.h>
+ #include <libavutil/pixdesc.h>
++#include <libavutil/version.h>
+ 
+ #define FAIL_IF_ERROR( cond, ... ) FAIL_IF_ERR( cond, "lavf", __VA_ARGS__ )
+@@ -142,6 +143,11 @@
+     {
+         info->fullrange  = is_fullrange;
++#if LIBAVUTIL_VERSION_MAJOR < 60
+         info->interlaced = h->frame->interlaced_frame;
+         info->tff        = h->frame->top_field_first;
++#else
++        info->interlaced = !!(h->frame->flags & AV_FRAME_FLAG_INTERLACED);
++        info->tff        = !!(h->frame->flags & 
AV_FRAME_FLAG_TOP_FIELD_FIRST);
++#endif
+     }
+ 

diff --git a/media-video/x264-encoder/x264-encoder-0.0.20240513.ebuild 
b/media-video/x264-encoder/x264-encoder-0.0.20240513.ebuild
index c53a2644e307..7349f0638fb4 100644
--- a/media-video/x264-encoder/x264-encoder-0.0.20240513.ebuild
+++ b/media-video/x264-encoder/x264-encoder-0.0.20240513.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -39,6 +39,10 @@ DEPEND="
 "
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+       "${FILESDIR}"/${P}-ffmpeg8.patch
+)
+
 src_configure() {
        tc-export CC
 

Reply via email to