Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
38f48b65
Commit
38f48b65
authored
May 24, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect minimum speed
parent
51e92d90
Pipeline
#3733
passed with stage
in 14 minutes and 28 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+2
-2
No files found.
src/timeline2/view/timelinecontroller.cpp
View file @
38f48b65
...
...
@@ -1441,14 +1441,14 @@ void TimelineController::changeItemSpeed(int clipId, double speed)
// this is the max speed so that the clip is at least one frame long
double
maxSpeed
=
100.
*
duration
*
qAbs
(
m_model
->
getClipSpeed
(
clipId
));
// this is the min speed so that the clip doesn't bump into the next one on track
double
minSpeed
=
100.
*
duration
*
qAbs
(
m_model
->
getClipSpeed
(
clipId
))
/
(
duration
+
double
(
m_model
->
getBlankSizeNearClip
(
clipId
,
true
))
-
1
);
double
minSpeed
=
100.
*
duration
*
qAbs
(
m_model
->
getClipSpeed
(
clipId
))
/
(
duration
+
double
(
m_model
->
getBlankSizeNearClip
(
clipId
,
true
)));
// if there is a split partner, we must also take it into account
int
partner
=
m_model
->
getClipSplitPartner
(
clipId
);
if
(
partner
!=
-
1
)
{
double
duration2
=
m_model
->
getItemPlaytime
(
partner
);
double
maxSpeed2
=
100.
*
duration2
*
qAbs
(
m_model
->
getClipSpeed
(
partner
));
double
minSpeed2
=
100.
*
duration2
*
qAbs
(
m_model
->
getClipSpeed
(
partner
))
/
(
duration2
+
double
(
m_model
->
getBlankSizeNearClip
(
partner
,
true
))
-
1
);
double
minSpeed2
=
100.
*
duration2
*
qAbs
(
m_model
->
getClipSpeed
(
partner
))
/
(
duration2
+
double
(
m_model
->
getBlankSizeNearClip
(
partner
,
true
)));
minSpeed
=
std
::
max
(
minSpeed
,
minSpeed2
);
maxSpeed
=
std
::
min
(
maxSpeed
,
maxSpeed2
);
}
...
...
Write
Preview
Markdown
is supported
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