Fix speed job in some locales. Fixes #346

parent 4fe87ef0
Pipeline #8127 passed with stage
in 22 minutes and 7 seconds
......@@ -614,12 +614,11 @@ std::shared_ptr<Mlt::Producer> ProjectClip::getTimelineProducer(int trackId, int
}
}
if (!warpProducer) {
QLocale locale;
QString resource(originalProducer()->get("resource"));
if (resource.isEmpty() || resource == QLatin1String("<producer>")) {
resource = m_service;
}
QString url = QString("timewarp:%1:%2").arg(locale.toString(speed)).arg(resource);
QString url = QString("timewarp:%1:%2").arg(QString::fromStdString(std::to_string(speed))).arg(resource);
warpProducer.reset(new Mlt::Producer(*originalProducer()->profile(), url.toUtf8().constData()));
qDebug() << "new producer: " << url;
qDebug() << "warp LENGTH before" << warpProducer->get_length();
......
......@@ -68,9 +68,8 @@ void SpeedJob::configureConsumer()
void SpeedJob::configureProducer()
{
if (!qFuzzyCompare(m_speed, 1.0)) {
QLocale locale;
QString resource = m_producer->get("resource");
m_producer = std::make_unique<Mlt::Producer>(*m_profile.get(), "timewarp", QStringLiteral("%1:%2").arg(locale.toString(m_speed)).arg(resource).toUtf8().constData());
m_producer = std::make_unique<Mlt::Producer>(*m_profile.get(), "timewarp", QStringLiteral("%1:%2").arg(QString::fromStdString(std::to_string(m_speed))).arg(resource).toUtf8().constData());
}
}
......
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