summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-13 00:26:13 +0200
committerwm4 <wm4@nowhere>2014-08-13 00:26:13 +0200
commitf6f93b633650ccf997033ae753e0599b63764d2f (patch)
treecf2f45dda6439cd8e17c1aaeefa754f9ebc03400
parentdefa0a20e0e3b9590501f2f271765cfe7d520462 (diff)
downloadmpv-f6f93b633650ccf997033ae753e0599b63764d2f.tar.bz2
mpv-f6f93b633650ccf997033ae753e0599b63764d2f.tar.xz
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.
-rw-r--r--video/out/x11_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 539d66e641..5c3c5aea0d 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -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"),