diff options
author | Johns <johns98@gmx.net> | 2012-01-24 10:02:39 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-01-24 10:02:39 +0100 |
commit | 6ca4d3c44fe75d0ad475d214d55d73b9b4699cc4 (patch) | |
tree | 3aecd1a4c6c66c2cb552b460ffdc99d37cba42aa /video.c | |
parent | 2ac2eb39c633872b8bb5183854cef39722df4c90 (diff) | |
download | vdr-plugin-softhddevice-6ca4d3c44fe75d0ad475d214d55d73b9b4699cc4.tar.gz vdr-plugin-softhddevice-6ca4d3c44fe75d0ad475d214d55d73b9b4699cc4.tar.bz2 |
Fix dead-lock in VdpauExit.
Diffstat (limited to 'video.c')
-rw-r--r-- | video.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -3587,12 +3587,15 @@ static void VaapiSyncRenderFrame(VaapiDecoder * decoder, VideoPollEvent(); + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); // give osd some time slot while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex, &abstime) != ETIMEDOUT) { // SIGUSR1 Debug(3, "video/vaapi: pthread_cond_timedwait error\n"); } + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); VaapiSyncDisplayFrame(decoder); } @@ -6526,12 +6529,16 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder, VideoPollEvent(); + // fix dead-lock with VdpauExit + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); // give osd some time slot while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex, &abstime) != ETIMEDOUT) { // SIGUSR1 Debug(3, "video/vdpau: pthread_cond_timedwait error\n"); } + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); VdpauSyncDisplayFrame(decoder); } @@ -7360,11 +7367,10 @@ 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); - */ + // fix dead-lock with VdpauExit + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); VideoPollEvent(); |