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@gentoo.org>
This commit is contained in:
Ionen Wolkens 2025-10-25 09:28:55 -04:00
parent d7bb6d8051
commit a3c39bde4d
No known key found for this signature in database
GPG Key ID: B24406B0B0AC4334
2 changed files with 27 additions and 1 deletions

View File

@ -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
}

View File

@ -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 # Distributed under the terms of the GNU General Public License v2
EAPI=8 EAPI=8
@ -39,6 +39,10 @@ DEPEND="
" "
BDEPEND="virtual/pkgconfig" BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${P}-ffmpeg8.patch
)
src_configure() { src_configure() {
tc-export CC tc-export CC