mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1452048 - Read _captureStarted under lock on the camera thread. r=dminor
It is written under lock on the controlling thread (CamerasParent) in StartCapture/StopCapture. MozReview-Commit-ID: E7eq1YElhwt --HG-- extra : rebase_source : f37b666d84c6710ac0d5c56002b82c707635f49b
This commit is contained in:
parent
3ed24c4f4c
commit
2dcab8c04e
@ -116,7 +116,10 @@ int32_t VideoCaptureAndroid::OnIncomingFrame(uint8_t* videoFrame,
|
||||
size_t videoFrameLength,
|
||||
int32_t degrees,
|
||||
int64_t captureTime) {
|
||||
if (!_captureStarted)
|
||||
// _captureStarted is written on the controlling thread in
|
||||
// StartCapture/StopCapture. This is the camera thread.
|
||||
// CaptureStarted() will access it under a lock.
|
||||
if (!CaptureStarted())
|
||||
return 0;
|
||||
|
||||
VideoRotation current_rotation =
|
||||
|
Loading…
Reference in New Issue
Block a user