From d8210fd0eb28124409acef80f1b2333876660b71 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Sat, 14 Sep 2024 20:38:50 +0200 Subject: [PATCH] package/ffmpeg: fix build error ffmpeg builds with `--enable-vaapi` opt made GCC v14 and 32 bit target will throw an 'Wincompatible-pointer-types' error. This is a downport of an upstreamed commit but not yet present in any ffmpeg version that fix the pointer type. Fixes: - http://autobuild.buildroot.org/results/f5f/f5f2d16226ad9500ecf046779d5282ee071a54d3/ Signed-off-by: Thomas Perale Signed-off-by: Thomas Petazzoni (cherry picked from commit 24fc2f9d177b897f0c204f2c6611e6a3ed306a3d) Signed-off-by: Peter Korsgaard --- ...hwcontext-vaapi-use-the-correct-type.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch diff --git a/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch b/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch new file mode 100644 index 0000000000..177b4f1885 --- /dev/null +++ b/package/ffmpeg/0007-avutil-hwcontext-vaapi-use-the-correct-type.patch @@ -0,0 +1,28 @@ +From 6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb Mon Sep 17 00:00:00 2001 +From: James Almer +Date: Wed, 31 Jul 2024 10:00:54 -0300 +Subject: [PATCH] avutil/hwcontext_vaapi: use the correct type for + VASurfaceAttribExternalBuffers.buffers + +Should fix ticket #11115. + +Signed-off-by: James Almer +Upstream: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/6f8e365a2af2b6b21701d41eed3b2e3f8a436eeb +Signed-off-by: Thomas Perale +--- + libavutil/hwcontext_vaapi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c +index 4cb25dd03212e..15fd84aa40679 100644 +--- a/libavutil/hwcontext_vaapi.c ++++ b/libavutil/hwcontext_vaapi.c +@@ -1225,7 +1225,7 @@ static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst, + + if (!use_prime2 || vas != VA_STATUS_SUCCESS) { + int k; +- unsigned long buffer_handle; ++ uintptr_t buffer_handle; + VASurfaceAttribExternalBuffers buffer_desc; + VASurfaceAttrib buffer_attrs[2] = { + {