Commit d2af502b authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

This should avoid a potential deadlock (not that potential as it sounds actually)

parent 5b17bf75
......@@ -44,6 +44,10 @@ class WaitCondition
QMutexLocker lock( m_mutex );
m_waitCond->wait( m_mutex );
}
void waitLocked()
{
m_waitCond->wait( m_mutex );
}
void wake()
{
m_waitCond->wakeAll();
......
......@@ -205,7 +205,10 @@ ClipWorkflow::State ClipWorkflow::getState() const
void ClipWorkflow::startRender( bool startInPausedMode )
{
if ( isReady() == false )
{
QMutexLocker lock( m_initWaitCond->getMutex() );
m_initWaitCond->wait();
}
if ( startInPausedMode == false )
{
......@@ -270,8 +273,11 @@ void ClipWorkflow::checkSynchronisation( State newState )
switch ( newState )
{
case Ready:
{
QMutexLocker lock( m_initWaitCond->getMutex() );
m_initWaitCond->wake();
break ;
}
default:
break ;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment