mirror of https://github.com/mpv-player/mpv
x11: vdpau GLX interop needs X11 threads
Xlib is not thread-safe. Or actually it is, but it's an incomprehensible hack that was added later, and which needs to be acitvated manually (this makes no sense). And it appears that the vdpau accesses X from the decoder thread if GLX interop is used (and not in any other situations - this doesn't make too much sense either). So, just call the magic function that enables Xlib thread-safety.
This commit is contained in:
parent
defa0a20e0
commit
f6f93b6336
|
@ -399,6 +399,8 @@ int vo_x11_init(struct vo *vo)
|
|||
|
||||
assert(!vo->x11);
|
||||
|
||||
XInitThreads();
|
||||
|
||||
struct vo_x11_state *x11 = talloc_ptrtype(NULL, x11);
|
||||
*x11 = (struct vo_x11_state){
|
||||
.log = mp_log_new(x11, vo->log, "x11"),
|
||||
|
|
Loading…
Reference in New Issue