mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1892045: Quiet a thread-safety warning by taking a mutex in v4l2 capture r=webrtc-reviewers,pehrsons
Just to make the analyzer happy, no risk here Differential Revision: https://phabricator.services.mozilla.com/D207758
This commit is contained in:
parent
765855a457
commit
c9632cd18b
@ -303,7 +303,12 @@ int32_t VideoCaptureModuleV4L2::StartCapture(
|
||||
|
||||
// start capture thread;
|
||||
if (_captureThread.empty()) {
|
||||
quit_ = false;
|
||||
{
|
||||
// Probably can't be accessed from another thread with
|
||||
// _captureThread empty, but the analyzer doesn't know this
|
||||
MutexLock lock(&capture_lock_);
|
||||
quit_ = false;
|
||||
}
|
||||
_captureThread = rtc::PlatformThread::SpawnJoinable(
|
||||
[self = scoped_refptr(this)] {
|
||||
while (self->CaptureProcess()) {
|
||||
|
Loading…
Reference in New Issue
Block a user