Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gustavo Carneiro
kdenlive
Commits
a7651105
Commit
a7651105
authored
May 29, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix possible crash when dragging recently inserted clip in timeline.
Related to #698
parent
2e577702
Pipeline
#21837
passed with stage
in 9 minutes and 36 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
src/bin/projectclip.cpp
src/bin/projectclip.cpp
+1
-0
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+5
-2
No files found.
src/bin/projectclip.cpp
View file @
a7651105
...
...
@@ -494,6 +494,7 @@ bool ProjectClip::setProducer(std::shared_ptr<Mlt::Producer> producer, bool repl
}
}
pCore
->
bin
()
->
reloadMonitorIfActive
(
clipId
());
pCore
->
bin
()
->
updateTargets
(
clipId
());
for
(
auto
&
p
:
m_audioProducers
)
{
m_effectStack
->
removeService
(
p
.
second
);
}
...
...
src/timeline2/model/timelinemodel.cpp
View file @
a7651105
...
...
@@ -1111,13 +1111,16 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
trackId
=
audioTrackIds
.
at
(
audioTrackIds
.
count
()
-
keys
.
count
());
}
}
if
(
keys
.
isEmpty
())
{
return
false
;
}
audioStream
=
keys
.
first
();
}
else
{
// Dropping video, ensure we have enough audio tracks for its streams
int
mirror
=
getMirrorTrackId
(
trackId
);
QList
<
int
>
audioTids
=
getLowerTracksId
(
mirror
,
TrackType
::
AudioTrack
);
if
(
audioTids
.
count
()
<
keys
.
count
()
-
1
)
{
// C
Heck if pt
oject has enough audio tracks
// C
heck if pr
oject has enough audio tracks
if
(
keys
.
count
()
>
getTracksIds
(
true
).
count
())
{
// Not enough audio tracks in the project
pCore
->
displayMessage
(
i18n
(
"Not enough audio tracks for all streams (%1)"
,
keys
.
count
()),
ErrorMessage
);
...
...
@@ -1152,7 +1155,7 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
if
(
mirror
>
-
1
&&
getTrackById_const
(
mirror
)
->
isLocked
())
{
mirror
=
-
1
;
}
bool
canMirrorDrop
=
!
useTargets
&&
(
mirror
>
-
1
||
keys
.
count
()
>
1
);
bool
canMirrorDrop
=
!
useTargets
&&
(
(
mirror
>
-
1
&&
(
audioDrop
||
!
keys
.
isEmpty
()))
||
keys
.
count
()
>
1
);
QMap
<
int
,
int
>
dropTargets
;
if
(
res
&&
(
canMirrorDrop
||
!
target_track
.
isEmpty
())
&&
master
->
hasAudioAndVideo
())
{
int
streamsCount
=
0
;
...
...
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