Skip to content
Snippets Groups Projects
Commit f2ad356f authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add lock when updating framesets

parent 08bbd646
No related branches found
No related tags found
1 merge request!285Vision nodes sync to each other
Pipeline #22623 passed
...@@ -202,7 +202,10 @@ bool SourceWindow::_processFrameset(ftl::rgbd::FrameSet &fs, bool fromstream) { ...@@ -202,7 +202,10 @@ bool SourceWindow::_processFrameset(ftl::rgbd::FrameSet &fs, bool fromstream) {
} }
// Make sure there are enough framesets allocated // Make sure there are enough framesets allocated
{
UNIQUE_LOCK(mutex_, lk);
_checkFrameSets(fs.id); _checkFrameSets(fs.id);
}
if (!paused_) { if (!paused_) {
if (!fs.test(ftl::data::FSFlag::PARTIAL) || !screen_->root()->value("drop_partial_framesets", false)) { if (!fs.test(ftl::data::FSFlag::PARTIAL) || !screen_->root()->value("drop_partial_framesets", false)) {
...@@ -229,7 +232,10 @@ bool SourceWindow::_processFrameset(ftl::rgbd::FrameSet &fs, bool fromstream) { ...@@ -229,7 +232,10 @@ bool SourceWindow::_processFrameset(ftl::rgbd::FrameSet &fs, bool fromstream) {
} }
const auto *cstream = interceptor_; const auto *cstream = interceptor_;
{
UNIQUE_LOCK(mutex_, lk);
_createDefaultCameras(*framesets_[fs.id], true); // cstream->available(fs.id).has(Channel::Depth) _createDefaultCameras(*framesets_[fs.id], true); // cstream->available(fs.id).has(Channel::Depth)
}
//LOG(INFO) << "Channels = " << (unsigned int)cstream->available(fs.id); //LOG(INFO) << "Channels = " << (unsigned int)cstream->available(fs.id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment