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

Solving bug when changing workflow length.

parent d51c76cb
......@@ -40,7 +40,8 @@ quint8* WorkflowRenderer::silencedAudioBuffer = NULL;
WorkflowRenderer::WorkflowRenderer() :
m_mainWorkflow( MainWorkflow::getInstance() ),
m_stopping( false )
m_stopping( false ),
m_oldLength( 0 )
{
m_actionsMutex = new QMutex;
}
......@@ -469,13 +470,17 @@ WorkflowRenderer::mainWorkflowLenghtChanged( qint64 newLength )
{
if ( newLength > 0 )
{
if ( m_isRendering == false )
startPreview();
m_paused = false;
togglePlayPause( true );
if ( m_oldLength == 0 )
{
if ( m_isRendering == false )
startPreview();
m_paused = false;
togglePlayPause( true );
}
}
else if ( newLength == 0 && m_isRendering == true )
{
stop();
}
m_oldLength = newLength;
}
......@@ -340,8 +340,13 @@ class WorkflowRenderer : public GenericRenderer
*/
qint64 m_pts;
qint64 m_audioPts;
quint32 m_nbChannels;
quint32 m_rate;
quint32 m_nbChannels;
quint32 m_rate;
/**
* \brief Used in permanent rendering mode, to know is some operations
* has to be performed.
*/
qint64 m_oldLength;
public slots:
......
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