Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Fix missing keyframe with MLT >= 6.8.0

parent db8567a9
......@@ -75,6 +75,9 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
QString name = currentParameter.attribute(QStringLiteral("name"));
QString type = currentParameter.attribute(QStringLiteral("type"));
QString value = currentParameter.attribute(QStringLiteral("value"));
ParamRow currentRow;
currentRow.type = paramTypeFromStr(type);
currentRow.xml = currentParameter;
QLocale locale;
if (value.isNull()) {
QVariant defaultValue = parseAttribute(m_ownerId, QStringLiteral("default"), currentParameter);
......@@ -83,7 +86,7 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
bool isFixed = (type == QLatin1String("fixed"));
if (isFixed) {
m_fixedParams[name] = value;
} else if (type == QLatin1String("position")) {
} else if (currentRow.type == ParamType::Position) {
int val = value.toInt();
if (val < 0) {
int in = pCore->getItemIn(m_ownerId);
......@@ -91,6 +94,10 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
val += out;
value = QString::number(val);
}
} else if (currentRow.type == ParamType::KeyframeParam) {
if (!value.contains(QLatin1Char('='))) {
value.prepend(QStringLiteral("0="));
}
}
if (!name.isEmpty()) {
setParameter(name, value, false);
......@@ -101,9 +108,6 @@ AssetParameterModel::AssetParameterModel(Mlt::Properties *asset, const QDomEleme
// fixed parameters are not displayed so we don't store them.
continue;
}
ParamRow currentRow;
currentRow.type = paramTypeFromStr(type);
currentRow.xml = currentParameter;
currentRow.value = value;
QString title = currentParameter.firstChildElement(QStringLiteral("name")).text();
currentRow.name = title.isEmpty() ? name : title;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment