From f6f93b633650ccf997033ae753e0599b63764d2f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 13 Aug 2014 00:26:13 +0200 Subject: 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. --- video/out/x11_common.c | 2 ++ 1 file changed, 2 insertions(+) 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"), -- cgit v1.2.3