Commit 4945c0b1 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved another potential dead lock when stopping.

Performances when moving along in the clip should be a little improved
in synchrone mode.
parent f5f4f135
...@@ -175,16 +175,17 @@ void MainWorkflow::previousFrame() ...@@ -175,16 +175,17 @@ void MainWorkflow::previousFrame()
void MainWorkflow::setPosition( float pos ) void MainWorkflow::setPosition( float pos )
{ {
if ( m_renderStarted == false )
return ;
//Since any track can be reactivated, we reactivate all of them, and let them //Since any track can be reactivated, we reactivate all of them, and let them
//unable themself if required. //unable themself if required.
for ( unsigned int i = 0; i < m_trackCount; ++i) for ( unsigned int i = 0; i < m_trackCount; ++i)
m_tracks[i].activate(); m_tracks[i].activate();
if ( m_renderStarted == false )
return ;
qint64 frame = static_cast<qint64>( (float)m_length * pos ); qint64 frame = static_cast<qint64>( (float)m_length * pos );
m_currentFrame = frame; m_currentFrame = frame;
emit frameChanged( frame ); emit frameChanged( frame );
cancelSynchronisation();
//Do not emit a signal for the RenderWidget, since it's the one that triggered that call... //Do not emit a signal for the RenderWidget, since it's the one that triggered that call...
} }
......
...@@ -86,6 +86,9 @@ void* WorkflowRenderer::lock( void* datas ) ...@@ -86,6 +86,9 @@ void* WorkflowRenderer::lock( void* datas )
{ {
WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas ); WorkflowRenderer* self = reinterpret_cast<WorkflowRenderer*>( datas );
//If renderer is stopping, don't ask for another frame:
if ( self->m_isRendering == false )
return self->m_lastFrame;
//If we're not playing, then where in a paused media player. //If we're not playing, then where in a paused media player.
if ( self->m_pausedMediaPlayer == true ) if ( self->m_pausedMediaPlayer == true )
{ {
......
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