]> git.sesse.net Git - kdenlive/blobdiff - src/clipitem.cpp
Cleanup slideshow clip method, prepare for improved sequence support (still needs...
[kdenlive] / src / clipitem.cpp
index cac5eda2b4690f0c6f683d3588161c1a903ece7a..2c5fd7b9ab97087182d57b38f07efa3590e63a3b 100644 (file)
@@ -124,6 +124,8 @@ ClipItem::ClipItem(DocClipBase *clip, ItemInfo info, double fps, double speed, i
 ClipItem::~ClipItem()
 {
     blockSignals(true);
+    m_endThumbTimer.stop();
+    m_startThumbTimer.stop();
     if (scene()) scene()->removeItem(this);
     if (m_clipType == VIDEO || m_clipType == AV || m_clipType == SLIDESHOW || m_clipType == PLAYLIST) {
         //disconnect(m_clip->thumbProducer(), SIGNAL(thumbReady(int, QImage)), this, SLOT(slotThumbReady(int, QImage)));
@@ -573,7 +575,14 @@ void ClipItem::slotFetchThumbs()
         frames.append((int)(m_speedIndependantInfo.cropStart + m_speedIndependantInfo.cropDuration).frames(m_fps) - 1);
     }
 
-    m_clip->slotExtractImage(frames);
+    if (!frames.isEmpty()) m_clip->slotExtractImage(frames);
+}
+
+void ClipItem::stopThumbs()
+{
+    // Clip is about to be deleted, make sure we don't request thumbnails
+    disconnect(&m_startThumbTimer, SIGNAL(timeout()), this, SLOT(slotGetStartThumb()));
+    disconnect(&m_endThumbTimer, SIGNAL(timeout()), this, SLOT(slotGetEndThumb()));
 }
 
 void ClipItem::slotGetStartThumb()