mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Fix dead-lock in VdpauExit.
This commit is contained in:
parent
2ac2eb39c6
commit
6ca4d3c44f
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Fix for dead-lock in VdpauExit.
|
||||||
Workaround for dead-lock in VdpauExit.
|
Workaround for dead-lock in VdpauExit.
|
||||||
VDPAU: Add very primitive software scaler for grab image.
|
VDPAU: Add very primitive software scaler for grab image.
|
||||||
VA-API: Add auto-crop support.
|
VA-API: Add auto-crop support.
|
||||||
|
10
video.c
10
video.c
@ -3587,12 +3587,15 @@ static void VaapiSyncRenderFrame(VaapiDecoder * decoder,
|
|||||||
|
|
||||||
VideoPollEvent();
|
VideoPollEvent();
|
||||||
|
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
|
pthread_testcancel();
|
||||||
// give osd some time slot
|
// give osd some time slot
|
||||||
while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex,
|
while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex,
|
||||||
&abstime) != ETIMEDOUT) {
|
&abstime) != ETIMEDOUT) {
|
||||||
// SIGUSR1
|
// SIGUSR1
|
||||||
Debug(3, "video/vaapi: pthread_cond_timedwait error\n");
|
Debug(3, "video/vaapi: pthread_cond_timedwait error\n");
|
||||||
}
|
}
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||||
|
|
||||||
VaapiSyncDisplayFrame(decoder);
|
VaapiSyncDisplayFrame(decoder);
|
||||||
}
|
}
|
||||||
@ -6526,12 +6529,16 @@ static void VdpauSyncRenderFrame(VdpauDecoder * decoder,
|
|||||||
|
|
||||||
VideoPollEvent();
|
VideoPollEvent();
|
||||||
|
|
||||||
|
// fix dead-lock with VdpauExit
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
|
pthread_testcancel();
|
||||||
// give osd some time slot
|
// give osd some time slot
|
||||||
while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex,
|
while (pthread_cond_timedwait(&VideoWakeupCond, &VideoLockMutex,
|
||||||
&abstime) != ETIMEDOUT) {
|
&abstime) != ETIMEDOUT) {
|
||||||
// SIGUSR1
|
// SIGUSR1
|
||||||
Debug(3, "video/vdpau: pthread_cond_timedwait error\n");
|
Debug(3, "video/vdpau: pthread_cond_timedwait error\n");
|
||||||
}
|
}
|
||||||
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||||
|
|
||||||
VdpauSyncDisplayFrame(decoder);
|
VdpauSyncDisplayFrame(decoder);
|
||||||
}
|
}
|
||||||
@ -7360,11 +7367,10 @@ static void *VideoDisplayHandlerThread(void *dummy)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* other way to try to fix dead-lock with VdpauExit
|
// fix dead-lock with VdpauExit
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
pthread_testcancel();
|
pthread_testcancel();
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
|
||||||
*/
|
|
||||||
|
|
||||||
VideoPollEvent();
|
VideoPollEvent();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user