Commit 2f18ed60 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved repositionning bug when having more than one track.

parent 6aee7b53
......@@ -33,7 +33,8 @@ TrackWorkflow::TrackWorkflow( unsigned int trackId, MainWorkflow::TrackType type
m_forceRepositionning( false ),
m_paused( false ),
m_synchroneRenderBuffer( NULL ),
m_trackType( type )
m_trackType( type ),
m_lastFrame( 0 )
{
m_forceRepositionningMutex = new QMutex;
m_clipsLock = new QReadWriteLock;
......@@ -281,6 +282,7 @@ void TrackWorkflow::stop()
stopClipWorkflow( it.value() );
++it;
}
m_lastFrame = 0;
}
bool TrackWorkflow::getOutput( qint64 currentFrame )
......@@ -289,7 +291,6 @@ bool TrackWorkflow::getOutput( qint64 currentFrame )
QMap<qint64, ClipWorkflow*>::iterator it = m_clips.begin();
QMap<qint64, ClipWorkflow*>::iterator end = m_clips.end();
static qint64 lastFrame = 0;
bool needRepositioning;
bool hasRendered = false;
......@@ -305,10 +306,10 @@ bool TrackWorkflow::getOutput( qint64 currentFrame )
needRepositioning = true;
m_forceRepositionning = false;
}
else if ( m_paused == true && currentFrame != lastFrame )
else if ( m_paused == true && currentFrame != m_lastFrame )
needRepositioning = true;
else
needRepositioning = ( abs( currentFrame - lastFrame ) > 1 ) ? true : false;
needRepositioning = ( abs( currentFrame - m_lastFrame ) > 1 ) ? true : false;
}
m_nbClipToRender = 0;
......@@ -342,7 +343,7 @@ bool TrackWorkflow::getOutput( qint64 currentFrame )
{
clipWorkflowRenderCompleted( NULL );
}
lastFrame = currentFrame;
m_lastFrame = currentFrame;
return hasRendered;
}
......
......@@ -124,6 +124,7 @@ class TrackWorkflow : public QObject
void* m_synchroneRenderBuffer;
MainWorkflow::TrackType m_trackType;
qint64 m_lastFrame;
private slots:
void clipWorkflowPaused();
......
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