diff --git a/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc b/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc index 8051026ffd..e6fa9d5f32 100644 --- a/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc +++ b/webrtc/modules/desktop_capture/fallback_desktop_capturer_wrapper.cc @@ -130,8 +130,15 @@ bool FallbackDesktopCapturerWrapper::SelectSource(SourceId id) { if (main_capturer_permanent_error_) { return secondary_capturer_->SelectSource(id); } - return main_capturer_->SelectSource(id) && - secondary_capturer_->SelectSource(id); + const bool main_capturer_result = main_capturer_->SelectSource(id); + RTC_HISTOGRAM_BOOLEAN( + "WebRTC.DesktopCapture.PrimaryCapturerSelectSourceError", + main_capturer_result); + if (!main_capturer_result) { + main_capturer_permanent_error_ = true; + } + + return secondary_capturer_->SelectSource(id); } bool FallbackDesktopCapturerWrapper::FocusOnSelectedSource() {