summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Jager <t.jager@gmx.de>2013-09-19 13:58:55 +0200
committerTorsten Jager <t.jager@gmx.de>2013-09-19 13:58:55 +0200
commitc8d3d7ec5b8bc7b58cc9e90b3ed4a62ef565b81a (patch)
treed37fb28eff70bb72de58613ae9c35d4cdabbbd05
parent88adea15db8b5bd937b018f7ddf19c03a02a94f4 (diff)
downloadxine-lib-c8d3d7ec5b8bc7b58cc9e90b3ed4a62ef565b81a.tar.gz
xine-lib-c8d3d7ec5b8bc7b58cc9e90b3ed4a62ef565b81a.tar.bz2
video_out_vdpau: dont work around already thread safe X11.
Still not sure whether this is the end of the story now.
-rw-r--r--configure.ac11
-rw-r--r--src/video_out/video_out_vdpau.c4
2 files changed, 13 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f5cb7685f..30f03c3af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -994,6 +994,17 @@ AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.$acl_cv_shlibext}", [T
x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libXv.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
AC_DEFINE_UNQUOTED([LIBXV_SO], "${x_lib_location:-libXv.$acl_cv_shlibext}", [The soname of libXv, needed for dlopen()])
+dnl Does X11 need XLockDisplay () to prevent deadlocks?
+AC_MSG_CHECKING([for thread safe X11])
+x_is_thread_safe=no
+if test -n "$PKG_CONFIG" ; then
+ if "$PKG_CONFIG" --atleast-version 1.9 xcb && "$PKG_CONFIG" --atleast-version 1.4.99.901 x11 ; then
+ x_is_thread_safe=yes
+ AC_DEFINE([HAVE_THREAD_SAFE_X11], [1], [Define this if x11 does without XLockDisplay ().])
+ fi
+fi
+AC_MSG_RESULT([$x_is_thread_safe])
+
dnl _FILE_OFFSET_BITS (AC_SYS_LARGEFILE; ac_cv_sys_file_offset_bits)
dnl _LARGE_FILES (AC_SYS_LARGEFILE; ac_cv_sys_large_files)
dnl _LARGEFILE_SOURCE (AC_FUNC_SEEKO; ac_cv_sys_largfile_source)
diff --git a/src/video_out/video_out_vdpau.c b/src/video_out/video_out_vdpau.c
index 4b4cc7d2e..19a8361b9 100644
--- a/src/video_out/video_out_vdpau.c
+++ b/src/video_out/video_out_vdpau.c
@@ -59,9 +59,9 @@
#define NUM_FRAMES_BACK 1
+#ifndef HAVE_THREAD_SAFE_X11
#define LOCKDISPLAY /*define this if you have a buggy libX11/xcb*/
-//#undef LOCKDISPLAY
-
+#endif
#define DEINT_BOB 1
#define DEINT_HALF_TEMPORAL 2