Commit a69b9510 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

TracksWorkflow: Apply effects (without crashing) when nothing was rendered.

parent e919874e
......@@ -361,10 +361,19 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
else //If there's no mixer, just use the first frame, ignore the rest. It will be cleaned by the responsible ClipWorkflow.
ret = frames[0];
//Now handle filters :
quint32 *newFrame = EffectsEngine::applyFilters( m_filters, static_cast<const Workflow::Frame*>( ret ),
quint32 *newFrame = EffectsEngine::applyFilters( m_filters,
ret != NULL ? static_cast<const Workflow::Frame*>( ret ) : MainWorkflow::getInstance()->blackOutput(),
currentFrame, currentFrame * 1000.0 / m_fps );
if ( newFrame != NULL )
static_cast<Workflow::Frame*>( ret )->setBuffer( newFrame );
{
if ( ret != NULL )
static_cast<Workflow::Frame*>( ret )->setBuffer( newFrame );
else //Use the m_mixerBuffer as the frame to return. Ugly but avoid another attribute.
{
m_mixerBuffer->setBuffer( newFrame );
ret = m_mixerBuffer;
}
}
}
m_lastFrame = subFrame;
return ret;
......
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