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
aefb8432
Commit
aefb8432
authored
Jun 19, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix bug and warning calculating available mix duration when no frame is available
parent
aa544462
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dialogs/renderwidget.h
View file @
aefb8432
...
...
@@ -227,8 +227,8 @@ private:
void
prepareRendering
(
bool
delayedRendering
);
/** @brief Create a new empty playlist (*.mlt) file and @returns the filename of the created file */
QString
generatePlaylistFile
(
bool
delayedRendering
);
void
generateRenderFiles
(
QDomDocument
doc
,
int
in
,
int
out
,
QString
outputFile
,
bool
delayedRendering
);
RenderJobItem
*
createRenderJob
(
const
QString
&
playlist
,
const
QString
&
outputFile
,
int
in
,
int
out
);
void
generateRenderFiles
(
QDomDocument
doc
,
int
in
,
int
out
,
QString
outputFile
,
bool
delayedRendering
,
const
QString
&
subtitleFile
=
QString
()
);
RenderJobItem
*
createRenderJob
(
const
QString
&
playlist
,
const
QString
&
outputFile
,
int
in
,
int
out
,
const
QString
&
subtitleFile
=
QString
()
);
signals:
void
abortProcess
(
const
QString
&
url
);
...
...
src/timeline2/model/timelinemodel.cpp
View file @
aefb8432
...
...
@@ -938,9 +938,12 @@ bool TimelineModel::mixClip(int idToMove, const QString &mixId, int delta)
}
// Make sure we have enough space in clip to resize
// leftMax is the maximum frames we have to expand first clip on the right
leftMax
=
m_allClips
[
s
]
->
getPlaytime
();
leftMax
=
m_allClips
[
previousClip
]
->
m_endlessResize
?
m_allClips
[
s
]
->
getPlaytime
()
:
qMin
(
m_allClips
[
s
]
->
getPlaytime
(),
m_allClips
[
previousClip
]
->
getMaxDuration
()
-
m_allClips
[
previousClip
]
->
getOut
()
-
1
);
// rightMax is the maximum frames we have to expand second clip on the left
rightMax
=
m_allClips
[
previousClip
]
->
getPlaytime
();
rightMax
=
m_allClips
[
s
]
->
m_endlessResize
?
m_allClips
[
previousClip
]
->
getPlaytime
()
:
qMin
(
m_allClips
[
previousClip
]
->
getPlaytime
(),
m_allClips
[
s
]
->
getIn
());
if
(
getTrackById_const
(
selectedTrack
)
->
hasStartMix
(
previousClip
))
{
int
spaceBeforeMix
=
m_allClips
[
s
]
->
getPosition
()
-
(
m_allClips
[
previousClip
]
->
getPosition
()
+
m_allClips
[
previousClip
]
->
getMixDuration
());
rightMax
=
rightMax
==
-
1
?
spaceBeforeMix
:
qMin
(
rightMax
,
spaceBeforeMix
);
...
...
@@ -965,9 +968,10 @@ bool TimelineModel::mixClip(int idToMove, const QString &mixId, int delta)
// Mix at end of selected clip
// Make sure we have enough space in clip to resize
// leftMax is the maximum frames we have to expand first clip on the right
leftMax
=
m_allClips
[
nextClip
]
->
getPlaytime
();
leftMax
=
m_allClips
[
s
]
->
m_endlessResize
?
m_allClips
[
nextClip
]
->
getPlaytime
()
:
qMin
(
m_allClips
[
nextClip
]
->
getPlaytime
(),
m_allClips
[
s
]
->
getMaxDuration
()
-
m_allClips
[
s
]
->
getOut
()
-
1
);
// rightMax is the maximum frames we have to expand second clip on the left
rightMax
=
m_allClips
[
s
]
->
getPlaytime
(
);
rightMax
=
m_allClips
[
nextClip
]
->
m_endlessResize
?
m_allClips
[
s
]
->
getPlaytime
()
:
qMin
(
m_allClips
[
s
]
->
getPlaytime
(),
m_allClips
[
nextClip
]
->
getIn
()
);
if
(
getTrackById_const
(
selectedTrack
)
->
hasStartMix
(
s
))
{
int
spaceBeforeMix
=
m_allClips
[
nextClip
]
->
getPosition
()
-
(
m_allClips
[
s
]
->
getPosition
()
+
m_allClips
[
s
]
->
getMixDuration
());
rightMax
=
rightMax
==
-
1
?
spaceBeforeMix
:
qMin
(
rightMax
,
spaceBeforeMix
);
...
...
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