1
0
Fork 0
firefox/third_party/libwebrtc/moz-patch-stack/0102.patch
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

44 lines
1.5 KiB
Diff

From: Andreas Pehrson <apehrson@mozilla.com>
Date: Mon, 6 May 2024 07:28:00 +0000
Subject: Bug 1892329 - Invert _captureThread check in
VideoCaptureModuleV4L2::StartCapture. r=webrtc-reviewers,mjf
Differential Revision: https://phabricator.services.mozilla.com/D208186
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/6ed6737b8214bf664642eb17cbf66a8c8450e569
---
.../video_capture/linux/video_capture_v4l2.cc | 21 +++++++++++--------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/modules/video_capture/linux/video_capture_v4l2.cc b/modules/video_capture/linux/video_capture_v4l2.cc
index 74af348a6c..29ca864e19 100644
--- a/modules/video_capture/linux/video_capture_v4l2.cc
+++ b/modules/video_capture/linux/video_capture_v4l2.cc
@@ -303,16 +303,19 @@ int32_t VideoCaptureModuleV4L2::StartCapture(
}
// start capture thread;
- if (_captureThread.empty()) {
- quit_ = false;
- _captureThread = rtc::PlatformThread::SpawnJoinable(
- [self = scoped_refptr(this)] {
- while (self->CaptureProcess()) {
- }
- },
- "CaptureThread",
- rtc::ThreadAttributes().SetPriority(rtc::ThreadPriority::kHigh));
+ if (!_captureThread.empty()) {
+ return 0;
}
+
+ quit_ = false;
+
+ _captureThread = rtc::PlatformThread::SpawnJoinable(
+ [self = scoped_refptr(this)] {
+ while (self->CaptureProcess()) {
+ }
+ },
+ "CaptureThread",
+ rtc::ThreadAttributes().SetPriority(rtc::ThreadPriority::kHigh));
return 0;
}