Commit ac25b4f4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TrackWorkflow: Account for slow or late initialization

parent 31d29918
...@@ -192,9 +192,10 @@ TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame, ...@@ -192,9 +192,10 @@ TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame,
adjustClipTime( currentFrame, start, cw ); adjustClipTime( currentFrame, start, cw );
return cw->getOutput( mode, currentFrame - start ); return cw->getOutput( mode, currentFrame - start );
} }
else if ( state == ClipWorkflow::Stopped ) else if ( state == ClipWorkflow::Stopped || state == ClipWorkflow::Initializing )
{ {
cw->initialize(); if ( state == ClipWorkflow::Stopped )
cw->initialize();
//If the init failed, don't even try to call getOutput. //If the init failed, don't even try to call getOutput.
if ( cw->waitForCompleteInit() == false ) if ( cw->waitForCompleteInit() == false )
return NULL; return NULL;
...@@ -214,7 +215,7 @@ TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame, ...@@ -214,7 +215,7 @@ TrackWorkflow::renderClip( ClipWorkflow* cw, qint64 currentFrame,
} }
else else
{ {
vlmcCritical() << "Unexpected state:" << state; vlmcFatal( "Unexpected state: %d ", state );
} }
return NULL; return NULL;
} }
......
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