Commit 9664ddaa authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Fixed deadlock when mutting the only track that had something to render.

parent 39e74948
......@@ -57,6 +57,10 @@ class Toggleable
{
return ( m_hardDeactivated == true || m_activated == false );
}
bool hardDeactivated() const
{
return m_hardDeactivated;
}
void activate()
{
m_activated = true;
......
......@@ -106,7 +106,13 @@ void TrackHandler::getOutput( qint64 currentFrame )
{
if ( m_tracks[i].activated() == false )
{
m_effectEngine->setInputFrame( *TrackHandler::nullOutput, i );
if ( m_tracks[i].hardDeactivated() == true )
{
++m_nbTracksToRender;
m_tracks[i]->simulateBlackOutputRender();
}
else
m_effectEngine->setInputFrame( *TrackHandler::nullOutput, i );
continue ;
}
++m_nbTracksToRender;
......
......@@ -633,3 +633,8 @@ void TrackWorkflow::forceRepositionning()
QMutexLocker lock( m_forceRepositionningMutex );
m_forceRepositionning = true;
}
void TrackWorkflow::simulateBlackOutputRender()
{
clipWorkflowRenderCompleted( NULL );
}
......@@ -79,6 +79,12 @@ class TrackWorkflow : public QObject
void setFullSpeedRender( bool value );
void forceRepositionning();
/**
* \brief This method is only to simulate a track render, which will render a black output.
* this is meant to render a muted track, though the Qt event loop (QueuedConnection signal)
*/
void simulateBlackOutputRender();
private:
void computeLength();
void renderClip( ClipWorkflow* cw, qint64 currentFrame,
......
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