]> git.sesse.net Git - kdenlive/blobdiff - src/scopes/scopemanager.cpp
Fix issues with OpenGL aspect ration / corruption and DVD wizard monitor
[kdenlive] / src / scopes / scopemanager.cpp
index f9e55c36a84a394494bf9de1b2166f970403a99c..5782927f73835893a9cc35dde17fc59fe69bc464 100644 (file)
@@ -129,7 +129,7 @@ void ScopeManager::slotDistributeAudio(QVector<int16_t> sampleData, int freq, in
 
     checkActiveAudioScopes();
 }
-void ScopeManager::slotDistributeFrame(QImage image)
+void ScopeManager::slotDistributeFrame(const QImage image)
 {
 #ifdef DEBUG_SM
     qDebug() << "ScopeManager: Starting to distribute frame.";
@@ -178,7 +178,7 @@ void ScopeManager::slotRequestFrame(const QString widgetName)
             break;
         }
     }
-    m_lastConnectedRenderer->sendFrameUpdate();
+    if (m_lastConnectedRenderer) m_lastConnectedRenderer->sendFrameUpdate();
 }
 
 
@@ -202,11 +202,13 @@ void ScopeManager::slotUpdateActiveRenderer()
     }
 
     m_lastConnectedRenderer = m_monitorManager->activeRenderer();
+    // DVD monitor shouldn't be monitored or will cause crash on deletion
+    if (m_monitorManager->isActive(Kdenlive::dvdMonitor)) m_lastConnectedRenderer = NULL;
 
     // Connect new renderer
     if (m_lastConnectedRenderer != NULL) {
-        b &= connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(QImage)),
-                this, SLOT(slotDistributeFrame(QImage)), Qt::UniqueConnection);
+        b &= connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(const QImage)),
+                this, SLOT(slotDistributeFrame(const QImage)), Qt::UniqueConnection);
         b &= connect(m_lastConnectedRenderer, SIGNAL(audioSamplesSignal(QVector<int16_t>,int,int,int)),
                 this, SLOT(slotDistributeAudio(QVector<int16_t>,int,int,int)), Qt::UniqueConnection);
         Q_ASSERT(b);