Commit 865045d4 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Solved crash when exiting.

We now have a clean shutdown process, or at least it doesn't crash :o)
parent 075d4367
......@@ -33,6 +33,15 @@ TrackWorkflow::TrackWorkflow( unsigned int trackId ) :
TrackWorkflow::~TrackWorkflow()
{
QMap<qint64, ClipWorkflow*>::iterator it = m_clips.begin();
QMap<qint64, ClipWorkflow*>::iterator end = m_clips.end();
while ( it != end )
{
stopClipWorkflow( it.value() );
delete it.value();
it = m_clips.erase( it );
}
delete m_mediaPlayer;
}
......
......@@ -68,6 +68,11 @@ void ClipPreviewWidget::stop()
m_isRendering = false;
m_mediaPlayer->stop();
m_paused = false;
disconnect( m_mediaPlayer, SIGNAL( stopped() ), this, SLOT( __videoStopped() ) );
disconnect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( __videoPaused() ) );
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( __videoPlaying() ) );
disconnect( m_mediaPlayer, SIGNAL( positionChanged() ), this, SLOT( __positionChanged() ) );
disconnect( m_mediaPlayer, SIGNAL( endReached() ), this, SLOT( __endReached() ) );
}
}
......
......@@ -62,6 +62,14 @@ RenderPreviewWidget::RenderPreviewWidget( MainWorkflow* mainWorkflow, QWidget* r
RenderPreviewWidget::~RenderPreviewWidget()
{
m_mediaPlayer->stop();
disconnect( m_mediaPlayer, SIGNAL( playing() ), this, SLOT( __videoPlaying() ) );
disconnect( m_mediaPlayer, SIGNAL( paused() ), this, SLOT( __videoPaused() ) );
disconnect( m_mediaPlayer, SIGNAL( stopped() ), this, SLOT( __videoStopped() ) );
disconnect( m_mainWorkflow, SIGNAL( mainWorkflowEndReached() ), this, SLOT( __endReached() ) );
disconnect( m_mainWorkflow, SIGNAL( positionChanged( float ) ), this, SLOT( __positionChanged( float ) ) );
delete m_media;
}
......@@ -76,7 +84,7 @@ void RenderPreviewWidget::unlock( void* datas )
{
RenderPreviewWidget* self = reinterpret_cast<RenderPreviewWidget*>( datas );
qDebug() << "RenderPreviewWidget::unlock() : Frame rendered";
// qDebug() << "RenderPreviewWidget::unlock() : Frame rendered";
QWriteLocker lock( self->m_framePlayedLock );
self->m_framePlayed = true;
}
......
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