summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/moz-patch-stack/0101.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /third_party/libwebrtc/moz-patch-stack/0101.patch
parentInitial commit. (diff)
downloadthunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz
thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/moz-patch-stack/0101.patch')
-rw-r--r--third_party/libwebrtc/moz-patch-stack/0101.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/third_party/libwebrtc/moz-patch-stack/0101.patch b/third_party/libwebrtc/moz-patch-stack/0101.patch
new file mode 100644
index 0000000000..95fe9665c6
--- /dev/null
+++ b/third_party/libwebrtc/moz-patch-stack/0101.patch
@@ -0,0 +1,71 @@
+From: Andreas Pehrson <apehrson@mozilla.com>
+Date: Wed, 10 May 2023 08:01:00 +0000
+Subject: Bug 1828065 - cherry-pick upstream libwebrtc commit 6fc1ae58be.
+ r=webrtc-reviewers,mjf
+
+Upstream commit: https://webrtc.googlesource.com/src/+/6fc1ae58be7cbb61ad0431d90eb7a7dc333de2f2
+ In DeviceInfoDS check that out vars were set
+
+ Bug: chromium:1441804
+ Change-Id: Id07cb61519315d77c2d7cdab1053efaaf7473e1a
+ Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304060
+ Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
+ Reviewed-by: Per Kjellander <perkj@webrtc.org>
+ Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
+ Cr-Commit-Position: refs/heads/main@{#39982}
+
+Differential Revision: https://phabricator.services.mozilla.com/D177236
+Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/60d381b6016ae5af0181b44c6a31b41eab094793
+---
+ modules/video_capture/windows/device_info_ds.cc | 13 +++++++------
+ modules/video_capture/windows/help_functions_ds.cc | 3 +++
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/modules/video_capture/windows/device_info_ds.cc b/modules/video_capture/windows/device_info_ds.cc
+index 6b4c57d01e..2c192fe4f6 100644
+--- a/modules/video_capture/windows/device_info_ds.cc
++++ b/modules/video_capture/windows/device_info_ds.cc
+@@ -505,9 +505,9 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8)
+ }
+
+ if (hrVC == S_OK) {
+- LONGLONG* frameDurationList;
+- LONGLONG maxFPS;
+- long listSize;
++ LONGLONG* frameDurationList = NULL;
++ LONGLONG maxFPS = 0;
++ long listSize = 0;
+ SIZE size;
+ size.cx = capability.width;
+ size.cy = capability.height;
+@@ -520,9 +520,10 @@ int32_t DeviceInfoDS::CreateCapabilityMap(const char* deviceUniqueIdUTF8)
+ hrVC = videoControlConfig->GetFrameRateList(
+ outputCapturePin, tmp, size, &listSize, &frameDurationList);
+
+- // On some odd cameras, you may get a 0 for duration.
+- // GetMaxOfFrameArray returns the lowest duration (highest FPS)
+- if (hrVC == S_OK && listSize > 0 &&
++ // On some odd cameras, you may get a 0 for duration. Some others may
++ // not update the out vars. GetMaxOfFrameArray returns the lowest
++ // duration (highest FPS), or 0 if there was no list with elements.
++ if (hrVC == S_OK &&
+ 0 != (maxFPS = GetMaxOfFrameArray(frameDurationList, listSize))) {
+ capability.maxFPS = static_cast<int>(10000000 / maxFPS);
+ capability.supportFrameRateControl = true;
+diff --git a/modules/video_capture/windows/help_functions_ds.cc b/modules/video_capture/windows/help_functions_ds.cc
+index b767726107..47fecfe4a1 100644
+--- a/modules/video_capture/windows/help_functions_ds.cc
++++ b/modules/video_capture/windows/help_functions_ds.cc
+@@ -21,6 +21,9 @@ namespace webrtc {
+ namespace videocapturemodule {
+ // This returns minimum :), which will give max frame rate...
+ LONGLONG GetMaxOfFrameArray(LONGLONG* maxFps, long size) {
++ if (!maxFps || size <= 0) {
++ return 0;
++ }
+ LONGLONG maxFPS = maxFps[0];
+ for (int i = 0; i < size; i++) {
+ if (maxFPS > maxFps[i])
+--
+2.34.1
+