diff --git a/modules/desktop_capture/linux/screen_capturer_x11.cc b/modules/desktop_capture/linux/screen_capturer_x11.cc index 7cdbb2a8a8..33e332613f 100644 --- a/modules/desktop_capture/linux/screen_capturer_x11.cc +++ b/modules/desktop_capture/linux/screen_capturer_x11.cc @@ -228,7 +228,9 @@ void ScreenCapturerX11::CaptureFrame() { int64_t capture_start_time_nanos = rtc::TimeNanos(); queue_.MoveToNextFrame(); - RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); + if (queue_.current_frame() && queue_.current_frame()->IsShared()) { + RTC_DLOG(LS_WARNING) << "Overwriting frame that is still shared."; + } // Process XEvents for XDamage and cursor shape tracking. options_.x_display()->ProcessPendingXEvents(); diff --git a/modules/desktop_capture/mac/screen_capturer_mac.mm b/modules/desktop_capture/mac/screen_capturer_mac.mm index 29d2017356..701d44476e 100644 --- a/modules/desktop_capture/mac/screen_capturer_mac.mm +++ b/modules/desktop_capture/mac/screen_capturer_mac.mm @@ -198,7 +198,9 @@ void ScreenCapturerMac::CaptureFrame() { int64_t capture_start_time_nanos = rtc::TimeNanos(); queue_.MoveToNextFrame(); - RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); + if (queue_.current_frame() && queue_.current_frame()->IsShared()) { + RTC_DLOG(LS_WARNING) << "Overwriting frame that is still shared."; + } MacDesktopConfiguration new_config = desktop_config_monitor_->desktop_configuration(); if (!desktop_config_.Equals(new_config)) { diff --git a/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/modules/desktop_capture/win/screen_capturer_win_gdi.cc index dc27344f82..231754c952 100644 --- a/modules/desktop_capture/win/screen_capturer_win_gdi.cc +++ b/modules/desktop_capture/win/screen_capturer_win_gdi.cc @@ -78,7 +78,9 @@ void ScreenCapturerWinGdi::CaptureFrame() { int64_t capture_start_time_nanos = rtc::TimeNanos(); queue_.MoveToNextFrame(); - RTC_DCHECK(!queue_.current_frame() || !queue_.current_frame()->IsShared()); + if (queue_.current_frame() && queue_.current_frame()->IsShared()) { + RTC_DLOG(LS_WARNING) << "Overwriting frame that is still shared."; + } // Make sure the GDI capture resources are up-to-date. PrepareCaptureResources();