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

Solved dead lock when stopping still in frame by frame mode

parent cbc036fa
...@@ -248,10 +248,21 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw ) ...@@ -248,10 +248,21 @@ void TrackWorkflow::stopClipWorkflow( ClipWorkflow* cw )
// qDebug() << "Stopping a paused clipworkflow"; // qDebug() << "Stopping a paused clipworkflow";
cw->getStateLock()->unlock(); cw->getStateLock()->unlock();
cw->queryStateChange( ClipWorkflow::Stopping ); cw->queryStateChange( ClipWorkflow::Stopping );
cw->unpause(); cw->wake();
cw->stop(); cw->stop();
// qDebug() << "Stopped a paused clipworkflow"; // qDebug() << "Stopped a paused clipworkflow";
} }
else if ( cw->getState() == ClipWorkflow::ThreadPaused )
{
cw->getStateLock()->unlock();
//Ensure the thread is really paused...
{
QMutexLocker lock( cw->getSleepMutex() );
}
cw->queryStateChange( ClipWorkflow::Stopped );
cw->wake();
cw->stop();
}
else else
{ {
qDebug() << "Unexpected ClipWorkflow::State when stopping :" << cw->getState(); qDebug() << "Unexpected ClipWorkflow::State when stopping :" << cw->getState();
......
Supports Markdown
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