Commit 3e97581a authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Correcting potential crash when restarting render

parent 3ec19321
......@@ -46,6 +46,7 @@ void WorkflowFileRendererDialog::setProgressBarValue( int val )
void WorkflowFileRendererDialog::updatePreview( const uchar* buff )
{
qDebug() << "Using QPixmap from workflow file renderer";
m_ui.previewLabel->setPixmap( QPixmap::fromImage( QImage( buff, VIDEOWIDTH, VIDEOHEIGHT, QImage::Format_RGB888 ).rgbSwapped() ) );
}
......
......@@ -165,6 +165,7 @@ void MetaDataWorker::renderSnapshot()
void MetaDataWorker::setSnapshot()
{
qDebug() << "Using QPixmap from setSnapshot";
QPixmap* pixmap = new QPixmap( m_tmpSnapshotFilename );
if ( pixmap->isNull() )
delete pixmap;
......
......@@ -226,15 +226,22 @@ void TrackWorkflow::stop()
stopClipWorkflow( it.value() );
++it;
}
releasePreviousRender();
m_lastFrame = 0;
}
void TrackWorkflow::releasePreviousRender()
{
if ( m_audioStackedBuffer != NULL )
{
m_audioStackedBuffer->release();
m_audioStackedBuffer = NULL;
}
if ( m_videoStackedBuffer != NULL )
{
m_videoStackedBuffer->release();
m_videoStackedBuffer = NULL;
}
}
void* TrackWorkflow::getOutput( 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