From 4a9f17415be3f80e42210fd78b57ce60663f8f45 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 12 Jan 2026 23:33:00 -0600 Subject: [PATCH] build(vaapi): Add vaMapBuffers2() stub (#4581) --- src/platform/linux/vaapi.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/platform/linux/vaapi.cpp b/src/platform/linux/vaapi.cpp index e0cc7930d..21f0b3545 100644 --- a/src/platform/linux/vaapi.cpp +++ b/src/platform/linux/vaapi.cpp @@ -24,6 +24,18 @@ extern "C" { return VA_STATUS_ERROR_UNIMPLEMENTED; } #endif +#if !VA_CHECK_VERSION(1, 21, 0) + // vaMapBuffer2 stub allows Sunshine built against libva <2.21.0 to link against ffmpeg on libva 2.21.0 or later + VAStatus + vaMapBuffer2( + VADisplay dpy, + VABufferID buf_id, + void **pbuf, + uint32_t flags + ) { + return vaMapBuffer(dpy, buf_id, pbuf); + } +#endif } // local includes