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
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
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
Multimedia
Kdenlive
Commits
0c2a2eae
Commit
0c2a2eae
authored
Jan 01, 2021
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash if the clip of an audio align job is deleted during calculations
Related to
#900
parent
8c53fd0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+7
-4
No files found.
src/timeline2/view/timelinecontroller.cpp
View file @
0c2a2eae
...
...
@@ -2482,10 +2482,13 @@ void TimelineController::setAudioRef(int clipId)
std
::
unique_ptr
<
AudioEnvelope
>
envelope
(
new
AudioEnvelope
(
getClipBinId
(
clipId
),
clipId
));
m_audioCorrelator
.
reset
(
new
AudioCorrelation
(
std
::
move
(
envelope
)));
connect
(
m_audioCorrelator
.
get
(),
&
AudioCorrelation
::
gotAudioAlignData
,
this
,
[
&
](
int
cid
,
int
shift
)
{
int
pos
=
m_model
->
getClipPosition
(
m_audioRef
)
+
shift
-
m_model
->
getClipIn
(
m_audioRef
);
bool
result
=
m_model
->
requestClipMove
(
cid
,
m_model
->
getClipTrackId
(
cid
),
pos
,
true
,
true
,
true
);
if
(
!
result
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot move clip to frame %1."
,
(
pos
+
shift
)),
InformationMessage
,
500
);
// Ensure the clip was not deleted while processing calculations
if
(
m_model
->
isClip
(
cid
))
{
int
pos
=
m_model
->
getClipPosition
(
m_audioRef
)
+
shift
-
m_model
->
getClipIn
(
m_audioRef
);
bool
result
=
m_model
->
requestClipMove
(
cid
,
m_model
->
getClipTrackId
(
cid
),
pos
,
true
,
true
,
true
);
if
(
!
result
)
{
pCore
->
displayMessage
(
i18n
(
"Cannot move clip to frame %1."
,
(
pos
+
shift
)),
InformationMessage
,
500
);
}
}
});
connect
(
m_audioCorrelator
.
get
(),
&
AudioCorrelation
::
displayMessage
,
pCore
.
get
(),
&
Core
::
displayMessage
);
...
...
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