Commit 15228e34 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix forgotten mutex unlock

parent a35a76d5
......@@ -414,12 +414,12 @@ void ProjectClip::reloadProducer(bool refreshOnly, bool isProxy, bool forceAudio
}
ThumbnailCache::get()->invalidateThumbsForClip(clipId());
ClipLoadTask::start({ObjectType::BinClip,m_binId.toInt()}, xml, false, this);
//int loadJob = pCore->jobManager()->startJob<LoadJob>({clipId()}, loadjobId, QString(), xml);
//emit pCore->jobManager()->startJob<ThumbJob>({clipId()}, loadJob, QString(), -1, true, true);
if (forceAudioReload || (!isProxy && hashChanged)) {
discardAudioThumb();
}
ClipLoadTask::start({ObjectType::BinClip,m_binId.toInt()}, xml, false, this);
//int loadJob = pCore->jobManager()->startJob<LoadJob>({clipId()}, loadjobId, QString(), xml);
//emit pCore->jobManager()->startJob<ThumbJob>({clipId()}, loadJob, QString(), -1, true, true);
}
}
}
......@@ -1486,7 +1486,7 @@ void ProjectClip::discardAudioThumb()
if (!m_audioInfo) {
return;
}
pCore->taskManager.discardJobs({ObjectType::BinClip, m_binId.toInt()});
pCore->taskManager.discardJobs({ObjectType::BinClip, m_binId.toInt()}, AbstractTask::AUDIOTHUMBJOB);
QString audioThumbPath;
QList <int> streams = m_audioInfo->streams().keys();
// Delete audio thumbnail data
......
......@@ -48,12 +48,14 @@ TaskManager::~TaskManager()
void TaskManager::discardJobs(const ObjectId &owner, AbstractTask::JOBTYPE type)
{
QReadLocker lk(&m_tasksListLock);
m_tasksListLock.lockForRead();
// See if there is already a task for this MLT service and resource.
if (m_taskList.find(owner.second) == m_taskList.end()) {
m_tasksListLock.unlock();
return;
}
std::vector<AbstractTask*> taskList = m_taskList.at(owner.second);
m_tasksListLock.unlock();
for (AbstractTask* t : taskList) {
if (type == AbstractTask::NOJOBTYPE || type == t->m_type) {
// If so, then just add ourselves to be notified upon completion.
......
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