In VideoCaptureDS::{Start|Stop}Capture do not lock
Sequence- and RaceCheckers ensure thread safety, and show that these
locks protect nothing.
Bug: webrtc:15181
Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40345}
diff --git a/modules/video_capture/windows/video_capture_ds.cc b/modules/video_capture/windows/video_capture_ds.cc
index acdf400..37ee0fd 100644
--- a/modules/video_capture/windows/video_capture_ds.cc
+++ b/modules/video_capture/windows/video_capture_ds.cc
@@ -125,7 +125,6 @@
int32_t VideoCaptureDS::StartCapture(const VideoCaptureCapability& capability) {
RTC_DCHECK_RUN_ON(&api_checker_);
- MutexLock lock(&api_lock_);
if (capability != _requestedCapability) {
DisconnectGraph();
@@ -150,7 +149,6 @@
int32_t VideoCaptureDS::StopCapture() {
RTC_DCHECK_RUN_ON(&api_checker_);
- MutexLock lock(&api_lock_);
HRESULT hr = _mediaControl->StopWhenReady();
if (FAILED(hr)) {