From 01288be937efd7d08005d7cf6ea1c92e00fa6301 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 23 Nov 2025 13:20:36 -0600 Subject: [PATCH] Use the same X display name for VDPAU that SDL is using --- app/streaming/video/ffmpeg-renderers/vdpau.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/streaming/video/ffmpeg-renderers/vdpau.cpp b/app/streaming/video/ffmpeg-renderers/vdpau.cpp index e744855c..7c6fd55e 100644 --- a/app/streaming/video/ffmpeg-renderers/vdpau.cpp +++ b/app/streaming/video/ffmpeg-renderers/vdpau.cpp @@ -135,9 +135,15 @@ bool VDPAURenderer::initialize(PDECODER_PARAMETERS params) m_VideoWidth = params->width; m_VideoHeight = params->height; + char* displayName = nullptr; +#ifdef HAS_X11 + SDL_assert(info.subsystem == SDL_SYSWM_X11); + displayName = XDisplayString(info.info.x11.display); +#endif + err = av_hwdevice_ctx_create(&m_HwContext, AV_HWDEVICE_TYPE_VDPAU, - nullptr, nullptr, 0); + displayName, nullptr, 0); #if defined(APP_IMAGE) || defined(USE_FALLBACK_DRIVER_PATHS) // AppImages will be running with our libvdpau.so which means they don't know about