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

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

parent 39e74948
...@@ -57,6 +57,10 @@ class Toggleable ...@@ -57,6 +57,10 @@ class Toggleable
{ {
return ( m_hardDeactivated == true || m_activated == false ); return ( m_hardDeactivated == true || m_activated == false );
} }
bool hardDeactivated() const
{
return m_hardDeactivated;
}
void activate() void activate()
{ {
m_activated = true; m_activated = true;
......
...@@ -106,7 +106,13 @@ void TrackHandler::getOutput( qint64 currentFrame ) ...@@ -106,7 +106,13 @@ void TrackHandler::getOutput( qint64 currentFrame )
{ {
if ( m_tracks[i].activated() == false ) 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 ; continue ;
} }
++m_nbTracksToRender; ++m_nbTracksToRender;
......
...@@ -633,3 +633,8 @@ void TrackWorkflow::forceRepositionning() ...@@ -633,3 +633,8 @@ void TrackWorkflow::forceRepositionning()
QMutexLocker lock( m_forceRepositionningMutex ); QMutexLocker lock( m_forceRepositionningMutex );
m_forceRepositionning = true; m_forceRepositionning = true;
} }
void TrackWorkflow::simulateBlackOutputRender()
{
clipWorkflowRenderCompleted( NULL );
}
...@@ -79,6 +79,12 @@ class TrackWorkflow : public QObject ...@@ -79,6 +79,12 @@ class TrackWorkflow : public QObject
void setFullSpeedRender( bool value ); void setFullSpeedRender( bool value );
void forceRepositionning(); 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: private:
void computeLength(); void computeLength();
void renderClip( ClipWorkflow* cw, qint64 currentFrame, void renderClip( ClipWorkflow* cw, qint64 currentFrame,
......
Supports Markdown
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