Create a separate X11 Display object for libva

Sharing these directly is fraught with concurrency issues that
require extreme care on both sides to avoid spurious X11 errors,
hangs, and other nasty stuff. We can't necessarily depend on SDL,
libva, or the underlying VA drivers to do the right thing here.

Using a new Display (as FFmpeg does for VAAPI and VDPAU) avoids
all these problems.
This commit is contained in:
Cameron Gutman
2025-11-23 13:21:10 -06:00
parent 01288be937
commit f5ef201905
2 changed files with 25 additions and 1 deletions
@@ -106,6 +106,7 @@ private:
SDL_Rect m_OverlayRect[Overlay::OverlayMax];
#ifdef HAVE_LIBVA_X11
Display* m_XDisplay;
Window m_XWindow;
#endif