Commit 7453e351 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Corrected mis-initialized flag bug which prevented 2 render in a row.

Removed useless flags
parent 2d0670d1
......@@ -100,6 +100,7 @@ void MainWorkflow::computeLength()
void MainWorkflow::startRender()
{
m_renderStarted = true;
m_paused = false;
m_currentFrame = 0;
emit frameChanged( 0 );
for ( unsigned int i = 0; i < m_trackCount; ++i )
......
......@@ -31,7 +31,6 @@ WorkflowRenderer::WorkflowRenderer( MainWorkflow* mainWorkflow ) :
m_mainWorkflow( mainWorkflow ),
m_pauseAsked( false ),
m_unpauseAsked( false ),
m_pausedMediaPlayer( false ),
m_stopping( false )
{
char buffer[64];
......@@ -151,6 +150,8 @@ void WorkflowRenderer::startPreview()
m_mediaPlayer->play();
m_isRendering = true;
m_paused = false;
m_stopping = false;
m_lastFrame = NULL;
}
void WorkflowRenderer::setPosition( float newPos )
......@@ -172,7 +173,6 @@ void WorkflowRenderer::pauseMainWorkflow()
{
if ( m_paused == true )
return ;
m_pausedMediaPlayer = true;
QMutexLocker lock( m_condMutex );
m_mainWorkflow->pause();
......@@ -183,7 +183,6 @@ void WorkflowRenderer::unpauseMainWorkflow()
{
if ( m_paused == false )
return ;
m_pausedMediaPlayer = false;
m_mainWorkflow->unpause();
}
......@@ -242,6 +241,7 @@ void WorkflowRenderer::stop()
m_isRendering = false;
m_paused = false;
m_pauseAsked = false;
m_unpauseAsked = false;
m_stopping = true;
m_mainWorkflow->cancelSynchronisation();
m_mediaPlayer->stop();
......@@ -281,7 +281,6 @@ void WorkflowRenderer::__videoPlaying()
else
{
m_paused = false;
m_pausedMediaPlayer = false;
emit playing();
}
}
......
......@@ -81,12 +81,6 @@ class WorkflowRenderer : public GenericRenderer
QWaitCondition* m_waitCond;
bool m_stopping;
/**
* \brief This flag is used to avoid using libvlc function from the media player thread,
* which can cause deadlock when stopping.
*/
bool m_pausedMediaPlayer;
public slots:
void setClip( Clip* ){}
void mediaUnloaded( const QUuid& ) {}
......
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