Chromium Code Reviews| Index: media/capture/video/win/video_capture_device_win.cc |
| diff --git a/media/capture/video/win/video_capture_device_win.cc b/media/capture/video/win/video_capture_device_win.cc |
| index 4cb7f30c344e73282d949ab833f7117de2da645d..85e37df6fdc95e1c98fa40a772319433b7b07743 100644 |
| --- a/media/capture/video/win/video_capture_device_win.cc |
| +++ b/media/capture/video/win/video_capture_device_win.cc |
| @@ -422,6 +422,7 @@ void VideoCaptureDeviceWin::AllocateAndStart( |
| return; |
| } |
| + client_->OnStarted(); |
| state_ = kCapturing; |
| } |
| @@ -457,6 +458,9 @@ void VideoCaptureDeviceWin::FrameReceived(const uint8_t* buffer, |
| int length, |
| const VideoCaptureFormat& format, |
| 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.
|
| + return; |
| + |
| if (first_ref_time_.is_null()) |
| first_ref_time_ = base::TimeTicks::Now(); |