Commit f057b345 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved little frame dropping problem when pausing.

Render is updated when changing position, even in paused mode.
parent 79751ba1
......@@ -81,8 +81,8 @@ void WorkflowRenderer::initializeRenderer()
m_media->addOption( callbacks );
//Workflow part
connect( m_mainWorkflow, SIGNAL( mainWorkflowPaused() ), this, SLOT( mainWorkflowPaused() ), Qt::QueuedConnection );
connect( m_mainWorkflow, SIGNAL( mainWorkflowUnpaused() ), this, SLOT( mainWorkflowUnpaused() ), Qt::QueuedConnection );
connect( m_mainWorkflow, SIGNAL( mainWorkflowPaused() ), this, SLOT( mainWorkflowPaused() ), Qt::DirectConnection );
connect( m_mainWorkflow, SIGNAL( mainWorkflowUnpaused() ), this, SLOT( mainWorkflowUnpaused() ), Qt::DirectConnection );
connect( m_mainWorkflow, SIGNAL( mainWorkflowEndReached() ), this, SLOT( __endReached() ) );
connect( m_mainWorkflow, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ),
this, SIGNAL( frameChanged( qint64, MainWorkflow::FrameChangedReason ) ) );
......
......@@ -259,6 +259,9 @@ void* TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFra
void* ret = NULL;
bool renderOneFrame = false;
if ( m_lastFrame == -1 )
m_lastFrame = currentFrame;
if ( checkEnd( currentFrame ) == true )
{
emit trackEndReached( m_trackId );
......@@ -286,13 +289,10 @@ void* TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFra
// as we need to resynchronize after a setTime, so this condition has to remain
// false. Easy ain't it ?
else if ( m_paused == true && subFrame != m_lastFrame && renderOneFrame == false)
{
needRepositioning = true;
}
else
needRepositioning = ( abs( subFrame - m_lastFrame ) > 1 ) ? true : false;
}
while ( it != end )
{
qint64 start = it.key();
......@@ -326,6 +326,7 @@ void* TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFra
void TrackWorkflow::pause()
{
m_paused = true;
m_lastFrame = -1;
}
void TrackWorkflow::moveClip( const QUuid& id, qint64 startingFrame )
......
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