summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-24 00:32:07 +0100
committerJohns <johns98@gmx.net>2012-01-24 00:32:07 +0100
commit2ac2eb39c633872b8bb5183854cef39722df4c90 (patch)
tree32f2e0c5cd721e94a32c1b879492e182b8d61fe1
parent217545542d79137d9ce42ad8fed8376db682feba (diff)
downloadvdr-plugin-softhddevice-2ac2eb39c633872b8bb5183854cef39722df4c90.tar.gz
vdr-plugin-softhddevice-2ac2eb39c633872b8bb5183854cef39722df4c90.tar.bz2
Workaround for dead-lock in VdpauExit.
-rw-r--r--ChangeLog1
-rw-r--r--Todo1
-rw-r--r--video.c13
3 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 74809b5..a0ec3eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
User johns
Date:
+ Workaround for dead-lock in VdpauExit.
VDPAU: Add very primitive software scaler for grab image.
VA-API: Add auto-crop support.
Suspend can close/open X11 window, connection and audio device.
diff --git a/Todo b/Todo
index 6aaacc4..647c98b 100644
--- a/Todo
+++ b/Todo
@@ -34,6 +34,7 @@ video:
grab image with scaling support
suspendoutput didn't show logo or black pictures
(must detect video format to show image)
+ first OSD can show random chaos
vdpau:
VdpPreemptionCallback handling (under construction)
diff --git a/video.c b/video.c
index 19753b5..37e1ea0 100644
--- a/video.c
+++ b/video.c
@@ -4564,6 +4564,7 @@ static void VdpauCleanup(VdpauDecoder * decoder)
int i;
if (decoder->VideoDecoder != VDP_INVALID_HANDLE) {
+ // hangs in lock
status = VdpauDecoderDestroy(decoder->VideoDecoder);
if (status != VDP_STATUS_OK) {
Error(_("video/vdpau: can't destroy video decoder: %s\n"),
@@ -5137,7 +5138,6 @@ static void VideoVdpauExit(void)
}
if (VdpauDevice) {
- xcb_flush(Connection);
VdpauExitOutputQueue();
// FIXME: more VDPAU cleanups...
@@ -7360,6 +7360,12 @@ static void *VideoDisplayHandlerThread(void *dummy)
#endif
for (;;) {
+ /* other way to try to fix dead-lock with VdpauExit
+ pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+ pthread_testcancel();
+ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+ */
+
VideoPollEvent();
#ifdef USE_VAAPI
@@ -8231,7 +8237,7 @@ void VideoInit(const char *display_name)
Fatal(_("video: Can't connect to X11 server on '%s'"), display_name);
// FIXME: we need to retry connection
}
- XInitThreads();
+ // XInitThreads();
// Convert XLIB display to XCB connection
if (!(Connection = XGetXCBConnection(XlibDisplay))) {
Fatal(_("video: Can't convert XLIB display to XCB connection"));
@@ -8338,6 +8344,9 @@ void VideoExit(void)
}
#ifdef USE_VIDEO_THREAD
VideoThreadExit();
+ // VDPAU cleanup hangs in XLockDisplay every 100 exits
+ // XUnlockDisplay(XlibDisplay);
+ // xcb_flush(Connection);
#endif
if (VideoUsedModule) {
VideoUsedModule->Exit();