QDomNamedNodeMap attributes = xml.attributes();
for (int i = 0; i < attributes.count(); i++) {
QString name = attributes.item(i).nodeName();
- if (name.startsWith("meta.attr.")) m_metadata.insert(name.section('.', 2, 3), attributes.item(i).nodeValue());
- else m_properties.insert(name, attributes.item(i).nodeValue());
+ if (name.startsWith("meta.attr.")) {
+ m_metadata.insert(name.section('.', 2, 3), attributes.item(i).nodeValue());
+ } else m_properties.insert(name, attributes.item(i).nodeValue());
}
if (xml.hasAttribute("cutzones")) {
m_baseTrackProducers[track] = NULL;
return NULL;
}
-
if (m_properties.contains("force_aspect_ratio")) m_baseTrackProducers[track]->set("force_aspect_ratio", m_properties.value("force_aspect_ratio").toDouble());
if (m_properties.contains("force_fps")) m_baseTrackProducers[track]->set("force_fps", m_properties.value("force_fps").toDouble());
if (m_properties.contains("force_progressive")) m_baseTrackProducers[track]->set("force_progressive", m_properties.value("force_progressive").toInt());
QMapIterator<QString, QString> i(properties);
while (i.hasNext()) {
i.next();
- m_metadata.insert(i.key(), i.value());
+ if (i.value().isEmpty() && m_metadata.contains(i.key())) {
+ m_metadata.remove(i.key());
+ } else {
+ m_metadata.insert(i.key(), i.value());
+ }
}
}