From 59db3686ed2fe0c4824566be41becd5ceeef66ce Mon Sep 17 00:00:00 2001 From: Andreas Pehrson Date: Tue, 1 Sep 2026 18:43:45 +0000 Subject: [PATCH] Bug 2055093 - Cherry-pick upstream libwebrtc commit bb91915655 r=webrtc-reviewers,dbaker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream commit: https://webrtc.googlesource.com/src/+/bb91915655ac409c482e0bf25304605a06435608 In VideoCaptureDS use Stop instead of StopWhenReady As reported on Firefox an Insta360 Link 2 Pro camera has a driver bug that leaves the camera light on until reboot when using StopWhenReady during teardown of a capture session. See https://bugzilla.mozilla.org/show_bug.cgi?id=2055093 Using Stop instead works around the driver bug, and better matches Chromium's DirectShow backend. Bug: none Change-Id: I90862fb94907638394df476abf4fcca3b532f50c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/497541 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Andreas Pehrson Reviewed-by: Erik Språng Cr-Commit-Position: refs/heads/main@{#48444} Differential Revision: https://phabricator.services.mozilla.com/D322705 --- .../libwebrtc/modules/video_capture/windows/video_capture_ds.cc | 2 +- .../libwebrtc/moz-patch-stack/bb91915655.no-op-cherry-pick-msg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 third_party/libwebrtc/moz-patch-stack/bb91915655.no-op-cherry-pick-msg diff --git a/third_party/libwebrtc/modules/video_capture/windows/video_capture_ds.cc b/third_party/libwebrtc/modules/video_capture/windows/video_capture_ds.cc index 045e71c98927..25b1364ae7ff 100644 --- a/third_party/libwebrtc/modules/video_capture/windows/video_capture_ds.cc +++ b/third_party/libwebrtc/modules/video_capture/windows/video_capture_ds.cc @@ -153,7 +153,7 @@ int32_t VideoCaptureDS::StartCapture(const VideoCaptureCapability& capability) { int32_t VideoCaptureDS::StopCapture() { RTC_DCHECK_RUN_ON(&api_checker_); - HRESULT hr = _mediaControl->StopWhenReady(); + HRESULT hr = _mediaControl->Stop(); if (FAILED(hr)) { RTC_LOG(LS_INFO) << "Failed to stop the capture graph. " << hr; return -1; diff --git a/third_party/libwebrtc/moz-patch-stack/bb91915655.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/bb91915655.no-op-cherry-pick-msg new file mode 100644 index 000000000000..e76ffb921708 --- /dev/null +++ b/third_party/libwebrtc/moz-patch-stack/bb91915655.no-op-cherry-pick-msg @@ -0,0 +1 @@ +We cherry-picked this in bug 2055093