diff --git a/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc b/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc index 2d158704cf75..217fe6283a0c 100644 --- a/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc +++ b/media/webrtc/trunk/webrtc/modules/video_capture/android/video_capture_android.cc @@ -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 =