From e56329d05aea49cebf8a3e8d31f9e171fc4aea79 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 27 Mar 2020 19:11:03 -0700 Subject: [PATCH] Don't render with vaPutSurface() on XWayland --- app/streaming/video/ffmpeg-renderers/vaapi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/vaapi.cpp b/app/streaming/video/ffmpeg-renderers/vaapi.cpp index 8564ee13..a668e2b1 100644 --- a/app/streaming/video/ffmpeg-renderers/vaapi.cpp +++ b/app/streaming/video/ffmpeg-renderers/vaapi.cpp @@ -1,6 +1,7 @@ #include #include "vaapi.h" +#include "utils.h" #include #include @@ -286,8 +287,10 @@ bool VAAPIRenderer::isDirectRenderingSupported() { // Many Wayland renderers don't support YUV surfaces, so use - // another frontend renderer to draw our frames. - return m_WindowSystem == SDL_SYSWM_X11; + // another frontend renderer to draw our frames. The iHD VAAPI + // driver can initialize on XWayland but it crashes in vaPutSurface() + // so we must also not directly render on XWayland either. + return m_WindowSystem == SDL_SYSWM_X11 && !WMUtils::isRunningWayland(); } int VAAPIRenderer::getDecoderColorspace()