tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 46b8cbbab6d55431ea86b338c9c3a4703ae95c69
parent 88abca040ae57eb4347bc2c4b7de7a4fbdbd6ce2
Author: Michael Froman <mfroman@mozilla.com>
Date:   Thu,  9 Oct 2025 14:52:28 -0500

Bug 1993083 - Vendor libwebrtc from d7b60365ad

Upstream commit: https://webrtc.googlesource.com/src/+/d7b60365ad1c86f56fe83240f08b4b757fedc10a
    Re-enable follow preferred order for codec fallback by default.

    With https://webrtc-review.googlesource.com/c/src/+/392141 landed, we should re-enable this feature so that HEVC encode failure won't always fallback to VP8.

    Bug: webrtc:416659453, webrtc:421880627
    Change-Id: I9b19051a8b75009053e55f98aca1d686df034a4e
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/400600
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
    Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45163}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/moz-patch-stack/s0068.patch | 2+-
Mthird_party/libwebrtc/moz-patch-stack/s0111.patch | 2+-
Mthird_party/libwebrtc/video/video_stream_encoder.cc | 2+-
Mthird_party/libwebrtc/video/video_stream_encoder_unittest.cc | 9++++++---
5 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T19:51:13.504824+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T19:52:18.524553+00:00. # base of lastest vendoring -586f5bd37a +d7b60365ad diff --git a/third_party/libwebrtc/moz-patch-stack/s0068.patch b/third_party/libwebrtc/moz-patch-stack/s0068.patch @@ -10,7 +10,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/a7179d8d75313b6c9 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc -index 3f7ae8141f..11c172ecb9 100644 +index 7961f64b70..fa0308f0f7 100644 --- a/video/video_stream_encoder.cc +++ b/video/video_stream_encoder.cc @@ -1443,7 +1443,7 @@ void VideoStreamEncoder::ReconfigureEncoder() { diff --git a/third_party/libwebrtc/moz-patch-stack/s0111.patch b/third_party/libwebrtc/moz-patch-stack/s0111.patch @@ -36,7 +36,7 @@ index 7fda03ffa8..8ca8462dd0 100644 ~VideoStreamFactoryInterface() override {} }; diff --git a/video/video_stream_encoder.cc b/video/video_stream_encoder.cc -index 11c172ecb9..9dfa42100a 100644 +index fa0308f0f7..22d03dba57 100644 --- a/video/video_stream_encoder.cc +++ b/video/video_stream_encoder.cc @@ -1055,6 +1055,7 @@ void VideoStreamEncoder::ReconfigureEncoder() { diff --git a/third_party/libwebrtc/video/video_stream_encoder.cc b/third_party/libwebrtc/video/video_stream_encoder.cc @@ -1527,7 +1527,7 @@ void VideoStreamEncoder::RequestEncoderSwitch() { } if (!preferred_fallback_encoder) { - if (env_.field_trials().IsEnabled( + if (!env_.field_trials().IsDisabled( kSwitchEncoderFollowCodecPreferenceOrderFieldTrial)) { encoder_fallback_requested_ = true; settings_.encoder_switch_request_callback->RequestEncoderFallback(); diff --git a/third_party/libwebrtc/video/video_stream_encoder_unittest.cc b/third_party/libwebrtc/video/video_stream_encoder_unittest.cc @@ -8234,6 +8234,9 @@ TEST_F(VideoStreamEncoderTest, SwitchEncoderOnInitFailureWithEncoderSelector) { TEST_F(VideoStreamEncoderTest, SwitchEncoderOnInitFailureWithoutEncoderSelector) { + field_trials_.Set("WebRTC-SwitchEncoderFollowCodecPreferenceOrder", + "Disabled"); + NiceMock<MockVideoEncoder> video_encoder; StrictMock<MockEncoderSwitchRequestCallback> switch_callback; video_send_config_.encoder_settings.encoder_switch_request_callback = @@ -8329,9 +8332,6 @@ TEST_F(VideoStreamEncoderTest, NoPreferenceDefaultFallbackToVP8Disabled) { constexpr int kDontCare = 100; constexpr int kNumFrames = 8; - field_trials_.Set("WebRTC-SwitchEncoderFollowCodecPreferenceOrder", - "Enabled"); - NiceMock<MockVideoEncoder> video_encoder; StrictMock<MockEncoderSwitchRequestCallback> switch_callback; video_send_config_.encoder_settings.encoder_switch_request_callback = @@ -8462,6 +8462,9 @@ TEST_F(VideoStreamEncoderTest, NoPreferenceDefaultFallbackToVP8Enabled) { constexpr int kSufficientBitrateToNotDrop = 1000; constexpr int kDontCare = 100; + field_trials_.Set("WebRTC-SwitchEncoderFollowCodecPreferenceOrder", + "Disabled"); + NiceMock<MockVideoEncoder> video_encoder; StrictMock<MockEncoderSwitchRequestCallback> switch_callback; video_send_config_.encoder_settings.encoder_switch_request_callback =