Commit 95d43f8a authored by Thomas Guillem's avatar Thomas Guillem

glx: force glx usage within the same X11 window instance

This commit fixes a crash on Debian Stretch and Ubuntu 17.10 when you fallback
from VDPAU (GLX forced) to SW decoding (EGL by default).

Fixes #19982
parent 6cc83a00
......@@ -237,6 +237,16 @@ static int Open (vlc_object_t *obj)
ReleaseCurrent (gl);
/* XXX: Prevent other gl backends (like EGL) to be opened within the same
* X11 window instance. Indeed, using EGL after GLX on the same X11 window
* instance leads to an SEGFAULT in the library. */
const char *vendor = glXGetClientString(dpy, GLX_VENDOR);
if (vendor && strncmp(vendor, "NVIDIA", sizeof("NVIDIA") - 1) == 0)
var_Create(gl->surface, "gl", VLC_VAR_STRING);
var_SetString(gl->surface, "gl", "glx");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment