diff --git a/webrtc/video_engine/vie_capturer.cc b/webrtc/video_engine/vie_capturer.cc index dc0a946d21..c976c45f68 100644 --- a/webrtc/video_engine/vie_capturer.cc +++ b/webrtc/video_engine/vie_capturer.cc @@ -511,7 +511,7 @@ bool ViECapturer::ViECaptureThreadFunction(void* obj) { bool ViECapturer::ViECaptureProcess() { if (capture_event_.Wait(kThreadWaitTimeMs) == kEventSignaled) { deliver_cs_->Enter(); - if (MaybeSwapCapturedAndDeliverFrame()) { + if (MaybeUpdateDeliverFrame()) { DeliverI420Frame(&deliver_frame_); } deliver_cs_->Leave(); @@ -646,7 +646,7 @@ void ViECapturer::OnNoPictureAlarm(const int32_t id, observer_->NoPictureAlarm(id, vie_alarm); } -bool ViECapturer::MaybeSwapCapturedAndDeliverFrame() { +bool ViECapturer::MaybeUpdateDeliverFrame() { CriticalSectionScoped cs(capture_cs_.get()); if (captured_frame_.IsZeroSize()) return false; diff --git a/webrtc/video_engine/vie_capturer.h b/webrtc/video_engine/vie_capturer.h index 8523972173..afb358ddeb 100644 --- a/webrtc/video_engine/vie_capturer.h +++ b/webrtc/video_engine/vie_capturer.h @@ -144,7 +144,7 @@ class ViECapturer void DeliverCodedFrame(VideoFrame* video_frame); private: - bool MaybeSwapCapturedAndDeliverFrame(); + bool MaybeUpdateDeliverFrame(); // Never take capture_cs_ before deliver_cs_! scoped_ptr capture_cs_;