Core: Fix possible video sync deadlock
Vicki Pfau vi@endrift.com
Fri, 27 Nov 2020 17:38:31 -0800
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/core/sync.c
→
src/core/sync.c
@@ -49,11 +49,11 @@ return true;
} MutexLock(&sync->videoFrameMutex); - ConditionWake(&sync->videoFrameRequiredCond); if (!sync->videoFrameWait && !sync->videoFramePending) { return false; } if (sync->videoFrameWait) { + ConditionWake(&sync->videoFrameRequiredCond); if (ConditionWaitTimed(&sync->videoFrameAvailableCond, &sync->videoFrameMutex, 50)) { return false; }@@ -67,6 +67,7 @@ if (!sync) {
return; } + ConditionWake(&sync->videoFrameRequiredCond); MutexUnlock(&sync->videoFrameMutex); }