Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
dd928e87
Commit
dd928e87
authored
Sep 22, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix speed job in some locales. Fixes #346
parent
4fe87ef0
Pipeline
#8127
passed with stage
in 22 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.cpp
View file @
dd928e87
...
...
@@ -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
.
toS
tring
(
speed
)).
arg
(
resource
);
QString
url
=
QString
(
"timewarp:%1:%2"
).
arg
(
QString
::
fromStdString
(
std
::
to_s
tring
(
speed
))
)
.
arg
(
resource
);
warpProducer
.
reset
(
new
Mlt
::
Producer
(
*
originalProducer
()
->
profile
(),
url
.
toUtf8
().
constData
()));
qDebug
()
<<
"new producer: "
<<
url
;
qDebug
()
<<
"warp LENGTH before"
<<
warpProducer
->
get_length
();
...
...
src/jobs/speedjob.cpp
View file @
dd928e87
...
...
@@ -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
.
toS
tring
(
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_s
tring
(
m_speed
))
)
.
arg
(
resource
).
toUtf8
().
constData
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment