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

Fix restarting a renderer

parent e8802bdd
...@@ -164,11 +164,11 @@ VLCSourceRenderer::setOption( const QString &option ) ...@@ -164,11 +164,11 @@ VLCSourceRenderer::setOption( const QString &option )
void void
VLCSourceRenderer::start() VLCSourceRenderer::start()
{ {
Q_ASSERT( m_media != NULL ); // If we're re-starting this renderer, we already have assigned a media to it
m_mediaPlayer->setMedia( m_media ); if ( m_media != NULL )
m_mediaPlayer->setMedia( m_media );
m_mediaPlayer->play(); m_mediaPlayer->play();
// Media should not be used after this point, all required information
// has been acquired by libvlc & any modification on the media from now // has been acquired by libvlc & any modification on the media from now
// on would be pointless anyway // on would be pointless anyway
delete m_media; delete m_media;
......
...@@ -138,7 +138,7 @@ ClipRenderer::togglePlayPause( bool forcePause ) ...@@ -138,7 +138,7 @@ ClipRenderer::togglePlayPause( bool forcePause )
{ {
if ( m_isRendering == false ) if ( m_isRendering == false )
{ {
m_sourceRenderer->playPause(); m_sourceRenderer->start();
m_sourceRenderer->setPosition( m_begin / ( m_end - m_begin ) ); m_sourceRenderer->setPosition( m_begin / ( m_end - m_begin ) );
m_isRendering = true; m_isRendering = 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