From 9a4d506b7e074ab59498db733c843b3bd9943e37 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Sun, 30 Oct 2011 18:25:52 +0000 Subject: [PATCH] Fix rendering when timeline contained proxy clips svn path=/trunk/kdenlive/; revision=6007 --- src/effectslist.cpp | 13 +++++++++++++ src/effectslist.h | 2 ++ src/mainwindow.cpp | 1 + 3 files changed, 16 insertions(+) diff --git a/src/effectslist.cpp b/src/effectslist.cpp index 696fa444..5b435cbe 100644 --- a/src/effectslist.cpp +++ b/src/effectslist.cpp @@ -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)); diff --git a/src/effectslist.h b/src/effectslist.h index cefaa5ae..0d170b35 100644 --- a/src/effectslist.h +++ b/src/effectslist.h @@ -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: diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index d5781c4a..829d1169 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -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); } } } -- 2.39.2