Commit 086226db authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle

Fix crash on audiothumbnail missing source

parent 8fbc80d9
Pipeline #24164 passed with stage
in 9 minutes and 35 seconds
......@@ -117,6 +117,9 @@ bool AudioThumbJob::computeWithFFMPEG()
if (filePath.isEmpty() || !QFile::exists(filePath)) {
filePath = m_prod->get("resource");
}
if (!QFile::exists(filePath)) {
return false;
}
m_ffmpegProcess.reset(new QProcess);
QString thumbPath = m_binClip->getAudioThumbPath(m_audioStream, true);
int audioStreamIndex = m_binClip->getAudioStreamFfmpegIndex(m_audioStream);
......@@ -148,11 +151,14 @@ bool AudioThumbJob::computeWithFFMPEG()
if (m_ffmpegProcess->exitStatus() != QProcess::CrashExit) {
if (m_dataInCache || !KdenliveSettings::audiothumbnails()) {
m_done = true;
return true;
}
}
}
if (!m_dataInCache && !m_done && KdenliveSettings::audiothumbnails()) {
if (!KdenliveSettings::audiothumbnails()) {
// We only wanted the thumb generation
return m_done;
}
if (!m_dataInCache && !m_done) {
// Generate timeline audio thumbnail data
m_audioLevels.clear();
std::vector<std::unique_ptr<QTemporaryFile>> channelFiles;
......@@ -274,10 +280,6 @@ bool AudioThumbJob::computeWithFFMPEG()
return true;
}
}
if (!KdenliveSettings::audiothumbnails()) {
// We only wanted the thumb generation
return true;
}
QString err = m_ffmpegProcess->readAllStandardError();
m_ffmpegProcess.reset();
// m_errorMessage += err;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment