Skip to content

Commit 04ee244

Browse files
PehrsonsWebRTC LUCI CQ
authored andcommitted
[M116] In VideoCaptureDS::{Start|Stop}Capture do not lock
Sequence- and RaceCheckers ensure thread safety, and show that these locks protect nothing. (cherry picked from commit dcf600d) Bug: webrtc:15181, chromium:1457919 Change-Id: I7c26cd9aea5fa72ad9435de5ec1b9135ac22b1e8 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305649 Reviewed-by: Ilya Nikolaevskiy <[email protected]> Commit-Queue: Ilya Nikolaevskiy <[email protected]> Reviewed-by: Per Kjellander <[email protected]> Cr-Original-Commit-Position: refs/heads/main@{#40345} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310520 Reviewed-by: Henrik Boström <[email protected]> Cr-Commit-Position: refs/branch-heads/5845@{#3} Cr-Branched-From: f80cf81-refs/heads/main@{#40319}
1 parent 279a054 commit 04ee244

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

modules/video_capture/windows/video_capture_ds.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ int32_t VideoCaptureDS::Init(const char* deviceUniqueIdUTF8) {
125125

126126
int32_t VideoCaptureDS::StartCapture(const VideoCaptureCapability& capability) {
127127
RTC_DCHECK_RUN_ON(&api_checker_);
128-
MutexLock lock(&api_lock_);
129128

130129
if (capability != _requestedCapability) {
131130
DisconnectGraph();
@@ -150,7 +149,6 @@ int32_t VideoCaptureDS::StartCapture(const VideoCaptureCapability& capability) {
150149

151150
int32_t VideoCaptureDS::StopCapture() {
152151
RTC_DCHECK_RUN_ON(&api_checker_);
153-
MutexLock lock(&api_lock_);
154152

155153
HRESULT hr = _mediaControl->StopWhenReady();
156154
if (FAILED(hr)) {

0 commit comments

Comments
 (0)