Skip to content
GitLab
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
cfba6861
Commit
cfba6861
authored
Apr 07, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix possible crash on audio thumbs abort
CCBUG: 419603
parent
300aa124
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/jobs/audiothumbjob.cpp
View file @
cfba6861
...
...
@@ -127,6 +127,7 @@ bool AudioThumbJob::computeWithFFMPEG()
connect
(
m_ffmpegProcess
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
&
AudioThumbJob
::
updateFfmpegProgress
,
Qt
::
UniqueConnection
);
connect
(
this
,
&
AudioThumbJob
::
jobCanceled
,
[
&
]
()
{
if
(
m_ffmpegProcess
)
{
disconnect
(
m_ffmpegProcess
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
&
AudioThumbJob
::
updateFfmpegProgress
);
m_ffmpegProcess
->
kill
();
}
m_done
=
true
;
...
...
@@ -194,6 +195,7 @@ bool AudioThumbJob::computeWithFFMPEG()
connect
(
m_ffmpegProcess
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
&
AudioThumbJob
::
updateFfmpegProgress
,
Qt
::
UniqueConnection
);
connect
(
this
,
&
AudioThumbJob
::
jobCanceled
,
[
&
]()
{
if
(
m_ffmpegProcess
)
{
disconnect
(
m_ffmpegProcess
.
get
(),
&
QProcess
::
readyReadStandardOutput
,
this
,
&
AudioThumbJob
::
updateFfmpegProgress
);
m_ffmpegProcess
->
kill
();
}
});
...
...
@@ -270,6 +272,9 @@ bool AudioThumbJob::computeWithFFMPEG()
void
AudioThumbJob
::
updateFfmpegProgress
()
{
if
(
m_ffmpegProcess
==
nullptr
)
{
return
;
}
QString
result
=
m_ffmpegProcess
->
readAllStandardOutput
();
const
QStringList
lines
=
result
.
split
(
QLatin1Char
(
'\n'
));
for
(
const
QString
&
data
:
lines
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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