]> git.sesse.net Git - kdenlive/commitdiff
Fix rendering when timeline contained proxy clips
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 30 Oct 2011 18:25:52 +0000 (18:25 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sun, 30 Oct 2011 18:25:52 +0000 (18:25 +0000)
svn path=/trunk/kdenlive/; revision=6007

src/effectslist.cpp
src/effectslist.h
src/mainwindow.cpp

index 696fa44402b9803d6bfa33b59dae4d825ddb2ee9..5b435cbedc1c9ef0461ad79ef4dba3b3040f04e7 100644 (file)
@@ -273,6 +273,19 @@ void EffectsList::removeProperty(QDomElement effect, const QString &name)
     }
 }
 
+// static
+void EffectsList::removeMetaProperties(QDomElement producer)
+{
+    QDomNodeList params = producer.elementsByTagName("property");
+    for (int i = 0; i < params.count(); i++) {
+        QDomElement e = params.item(i).toElement();
+        if (e.attribute("name").startsWith("meta")) {
+            producer.removeChild(params.item(i));
+            i--;
+        }
+    }
+}
+
 void EffectsList::append(QDomElement e)
 {
     m_baseElement.appendChild(importNode(e, true));
index cefaa5aed5c1c65900df8bf4c44af929d36cb62d..0d170b35431a87f6b3f9766da88d83aa14cbf4df 100644 (file)
@@ -81,6 +81,8 @@ public:
     static QString property(QDomElement effect, const QString &name);
     /** @brief Delete a 'property' element from the effect node. */
     static void removeProperty(QDomElement effect, const QString &name);
+    /** @brief Remove all 'meta.*' properties from a producer, used when replacing proxy producers in xml for rendering. */
+    static void removeMetaProperties(QDomElement producer);
     void clearList();
 
 private:
index d5781c4a27e0691b7513d6997483498ed99e4d43..829d1169c39c49324b519a953900de918e43df77 100644 (file)
@@ -3967,6 +3967,7 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS
                     // We need to delete the "aspect_ratio" property because proxy clips
                     // sometimes have different ratio than original clips
                     EffectsList::removeProperty(e, "aspect_ratio");
+                    EffectsList::removeMetaProperties(e);
                 }
             }
         }