summaryrefslogtreecommitdiff
path: root/vdr_decoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr_decoder.c')
-rw-r--r--vdr_decoder.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vdr_decoder.c b/vdr_decoder.c
index 5ac9706..0d7bbf1 100644
--- a/vdr_decoder.c
+++ b/vdr_decoder.c
@@ -203,9 +203,15 @@ bool mgDecoder::tryLock (void)
if (!m_locked && !m_playing)
{
- lock ();
+ m_locked++;
+
+ m_locklock.Unlock (); // don't hold the "locklock" when locking
+ // "lock", may cause a deadlock
+ m_lock.Lock ();
+ m_urgentLock = false;
res = true;
}
- m_locklock.Unlock ();
+ else
+ m_locklock.Unlock ();
return res;
}