]> git.sesse.net Git - kdenlive/commitdiff
Fix freeze on reloading a missing clip, don't reload twice missing clips that were...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 27 May 2012 16:13:13 +0000 (18:13 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 27 May 2012 16:13:48 +0000 (18:13 +0200)
src/clipmanager.cpp
src/docclipbase.cpp
src/projectlist.cpp

index 608087f4470c1c2d11186786051f4921324c4af3..ed7cbb0f403b6c5f4593b59232e3238718ba2b26 100644 (file)
@@ -54,7 +54,9 @@ ClipManager::ClipManager(KdenliveDoc *doc) :
     m_modifiedTimer.setInterval(1500);
     connect(&m_fileWatcher, SIGNAL(dirty(const QString &)), this, SLOT(slotClipModified(const QString &)));
     connect(&m_fileWatcher, SIGNAL(deleted(const QString &)), this, SLOT(slotClipMissing(const QString &)));
-    connect(&m_fileWatcher, SIGNAL(created(const QString &)), this, SLOT(slotClipAvailable(const QString &)));
+
+    // Seems like a dirty signal is emitted anyways when a watched file is created, so don't react twice.
+    //connect(&m_fileWatcher, SIGNAL(created(const QString &)), this, SLOT(slotClipAvailable(const QString &)));
     connect(&m_modifiedTimer, SIGNAL(timeout()), this, SLOT(slotProcessModifiedClips()));
 
 #if KDE_IS_VERSION(4,5,0)
index f54eaff7d0d6f8d05e846be388d8650177776418..be5a321f3de53e93a981407e500068b3cd0a99d9 100644 (file)
@@ -405,7 +405,7 @@ void DocClipBase::deleteProducers()
 {
     if (m_thumbProd) m_thumbProd->clearProducer();
     
-    if (numReferences() > 0) {
+    if (numReferences() > 0 && (!m_baseTrackProducers.isEmpty() || m_videoOnlyProducer || !m_audioTrackProducers.isEmpty())) {
         // Clip is used in timeline, delay producers deletion
         if (m_videoOnlyProducer) m_toDeleteProducers.append(m_videoOnlyProducer);
         for (int i = 0; i < m_baseTrackProducers.count(); i++) {
@@ -651,6 +651,7 @@ Mlt::Producer *DocClipBase::getCloneProducer()
     return prod;
 }
 
+
 Mlt::Producer *DocClipBase::getProducer(int track)
 {
     QMutexLocker locker(&m_producerMutex);
index b3d5f517897abde934c4e378146ca1f4ff5b005e..ff9d17481a57d5a2fd7b68fa4352ec4082a9bae2 100644 (file)
@@ -693,7 +693,7 @@ void ProjectList::slotReloadClip(const QString &id)
                 item->referencedClip()->setPlaceHolder(true);
                 item->setProperty("file_hash", QString());
             } else if (t == IMAGE) {
-                clip->getProducer()->set("force_reload", 1);
+                //clip->getProducer() clip->getProducer()->set("force_reload", 1);
             }
 
             QDomElement e = item->toXml();