Fix loading .mlt playlist can corrupt project profile

Fixes #266
parent ad990b83
Pipeline #5076 passed with stage
in 24 minutes and 25 seconds
......@@ -129,13 +129,16 @@ std::shared_ptr<Mlt::Producer> LoadJob::loadPlaylist(QString &resource)
qDebug() << "////// ERROR, CANNOT LOAD SELECTED PLAYLIST: " << resource;
return nullptr;
}
if (pCore->getCurrentProfile()->isCompatible(xmlProfile.get())) {
std::unique_ptr<ProfileInfo> prof(new ProfileParam(xmlProfile.get()));
if (static_cast<ProfileInfo*>(pCore->getCurrentProfile().get()) == prof.get()) {
// We can use the "xml" producer since profile is the same (using it with different profiles corrupts the project.
// Beware that "consumer" currently crashes on audio mixes!
//resource.prepend(QStringLiteral("xml:"));
} else {
// This is currently crashing so I guess we'd better reject it for now
m_errorMessage.append(i18n("Playlist has a different framerate (%1/%2fps), not recommended.", xmlProfile->frame_rate_num(), xmlProfile->frame_rate_den()));
if (!pCore->getCurrentProfile()->isCompatible(xmlProfile.get())) {
m_errorMessage.append(i18n("Playlist has a different framerate (%1/%2fps), not recommended.", xmlProfile->frame_rate_num(), xmlProfile->frame_rate_den()));
}
QString loader = resource;
loader.prepend(QStringLiteral("consumer:"));
pCore->getCurrentProfile()->set_explicit(1);
......
......@@ -36,7 +36,7 @@
#include <memory>
#include <mlt++/Mlt.h>
StabilizeJob::StabilizeJob(const QString &binId, const QString &filterName, QString destUrl, std::unordered_map<QString, QString> filterParams)
: MeltJob(binId, STABILIZEJOB, true, -1, -1)
: MeltJob(binId, STABILIZEJOB, false, -1, -1)
, m_filterName(filterName)
, m_destUrl(std::move(destUrl))
, m_filterParams(std::move(filterParams))
......
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