Avoid possible profile corruption with xml producer

CCBUG: 371189
parent dc80cd73
......@@ -341,8 +341,12 @@ bool BinController::removeBinClip(const QString &id)
Mlt::Producer *BinController::cloneProducer(Mlt::Producer &original)
{
QString xml = getProducerXML(original);
Mlt::Producer *clone = new Mlt::Producer(*original.profile(), "xml-string", xml.toUtf8().constData());
QString service = QString::fromLatin1(original.get("mlt_service"));
QString resource = QString::fromLatin1(original.get("resource"));
Mlt::Producer *clone = new Mlt::Producer(*original.profile(), service.toUtf8().constData(), resource.toUtf8().constData());
Mlt::Properties original_props(original.get_properties());
Mlt::Properties cloneProps(clone->get_properties());
cloneProps.inherit(original_props);
return clone;
}
......
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