gentoo-ebuilds/media-video/x264-encoder/files/x264-encoder-0.0.20240513-ffmpeg8.patch
Ionen Wolkens a3c39bde4d
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>
2025-10-25 09:30:09 -04:00

22 lines
713 B
Diff

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
}