]> git.sesse.net Git - kdenlive/blobdiff - src/kthumb.cpp
http://www.kdenlive.org/mantis/view.php?id=1610
[kdenlive] / src / kthumb.cpp
index 358e4223b13bee57001a185356221e2711048cc0..c8971af46b0fb7a2739656843cc3d8bace8e338d 100644 (file)
@@ -145,6 +145,8 @@ KThumb::~KThumb()
 
 void KThumb::setProducer(Mlt::Producer *producer)
 {
+    m_requestedThumbs.clear();
+    m_future.waitForFinished();
     m_producer = producer;
     // FIXME: the profile() call leaks an object, but trying to free
     // it leads to a double-free in Profile::~Profile()
@@ -195,7 +197,7 @@ void KThumb::extractImage(int frame, int frame2)
 void KThumb::doGetThumbs()
 {
     const int theight = KdenliveSettings::trackheight();
-    const int twidth = (int)(theight * m_dar + 0.5);
+    const int twidth = FRAME_SIZE;//(int)(theight * m_dar + 0.5);
 
     while (!m_requestedThumbs.isEmpty()) {
         int frame = m_requestedThumbs.takeFirst();