Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/libwebrtc/moz-patch-stack/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  0102.patch   Sprache: unbekannt

 
Spracherkennung für: .patch vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

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;
 }
 

[ Dauer der Verarbeitung: 0.31 Sekunden  ]