Chromium Code Reviews| Index: media/capture/video/mac/video_capture_device_mac.mm |
| diff --git a/media/capture/video/mac/video_capture_device_mac.mm b/media/capture/video/mac/video_capture_device_mac.mm |
| index d14f55102f8559442b74095a7db9fb25cd0af198..3477a5abd4139527f0eebe09a23de163469845e8 100644 |
| --- a/media/capture/video/mac/video_capture_device_mac.mm |
| +++ b/media/capture/video/mac/video_capture_device_mac.mm |
| @@ -359,6 +359,7 @@ void VideoCaptureDeviceMac::AllocateAndStart( |
| return; |
| } |
| + client_->OnStarted(); |
| state_ = kCapturing; |
| } |
| @@ -406,6 +407,9 @@ void VideoCaptureDeviceMac::ReceiveFrame(const uint8_t* video_frame, |
| int aspect_numerator, |
| int aspect_denominator, |
| base::TimeDelta timestamp) { |
| + if (state_ != kCapturing) |
|
chfremer
2017/02/17 23:51:15
Unless this runs on the same thread as AllocateAnd
braveyao
2017/02/22 18:06:44
Done.
Tried to apply std::atomic<> to all other pl
|
| + return; |
| + |
| if (capture_format_.frame_size != frame_format.frame_size) { |
| ReceiveError(FROM_HERE, |
| "Captured resolution " + frame_format.frame_size.ToString() + |