control: fixed deadlock in unregisterImageStatusCallback

video: fixing dead lock when stopping and changing expo time.
parent 3e4a24db
......@@ -1101,9 +1101,11 @@ void CtControl::unregisterImageStatusCallback(ImageStatusCallback& cb)
if((*i)->cb() == &cb)
{
found = true;
delete *i;
ImageStatusThread* status_thread = *i;
m_img_status_thread_list.erase(i);
cb.setImageStatusCallbackGen(NULL);
aLock.unlock();
delete status_thread;
break;
}
}
......
......@@ -517,9 +517,10 @@ void CtVideo::_setLive(bool liveFlag)
DEB_TRACE() << "Done with the startAcq.";
}
else {
//aLock.unlock();
aLock.unlock();
DEB_TRACE() << "Stopping the acquisition at the controller level";
m_ct.stopAcq();
aLock.lock();
}
}
m_pars.live = liveFlag;
......@@ -898,11 +899,11 @@ void CtVideo::_apply_params(AutoMutex &aLock,bool aForceLiveFlag)
acquisition->setAcqExpoTime(m_pars.exposure);
if(m_pars.live)
{
m_ct.stopAcq();
aLock.unlock();
m_ct.stopAcq();
m_ct.prepareAcq();
aLock.lock();
m_ct.startAcq();
aLock.lock();
m_pars.live = true;
}
}
......
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