Project

General

Profile

Files » xine-lib-vdpau-xlock.patch

Added configuration parameter for enabling/disabling XLockDisplay calls - durchflieger, 04/27/2012 04:45 PM

View differences:

src/video_out/video_out_vdpau.c
static VdpDecoderRender *orig_vdp_decoder_render;
#ifdef LOCKDISPLAY
#define DO_LOCKDISPLAY XLockDisplay(guarded_display)
#define DO_UNLOCKDISPLAY XUnlockDisplay(guarded_display)
#define DO_LOCKDISPLAY do { if (guarded_display) XLockDisplay(guarded_display); } while(0)
#define DO_UNLOCKDISPLAY do { if (guarded_display) XUnlockDisplay(guarded_display); } while(0)
static Display *guarded_display;
#else
#define DO_LOCKDISPLAY
......
return NULL;
#ifdef LOCKDISPLAY
guarded_display = visual->display;
int buggy_xcb_workaround = config->register_bool( config, "video.output.vdpau_enable_buggy_xcb_workaround", 1,
_("vdpau: Use lock display synchronization for some vdpau calls (workaround for buggy libX11/xcb)"),
_("Enable this if you have a buggy libX11/xcb."),
10, NULL, this );
guarded_display = buggy_xcb_workaround ? visual->display: NULL;
fprintf( stderr, "vo_vdpau: %s lock display synchronization for some vdpau calls\n", buggy_xcb_workaround ? "Use": "Do not use" );
#endif
this->display = visual->display;
(2-2/3)