commit 22c0a6aec2b886d0cc5d119cb65df2069b9961b1 parent e90c7b8e95a8132f03074de5c181192e583bfbf9 Author: Dan Baker <dbaker@mozilla.com> Date: Tue, 2 Dec 2025 01:11:36 -0700 Bug 2000941 - Vendor libwebrtc from de61a0f028 Upstream commit: https://webrtc.googlesource.com/src/+/de61a0f028f168f9562b05299dc212d3ae95f29b Reduce max pending frames to 2 in FrameInstrumentationGenerator. This fixes an issue with an capture source which allows only two frames in flight. A better long-term fix will need a refactoring of the main webrtc::VideoEncoder API. Bug: webrtc:358039777, b/445130105 Change-Id: Ia903cb6b084cc7b146ac51d816021e8413a8c2dd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/412260 Auto-Submit: Erik Språng <sprang@webrtc.org> Commit-Queue: Fanny Linderborg <linderborg@webrtc.org> Reviewed-by: Fanny Linderborg <linderborg@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45750} Diffstat:
3 files changed, 7 insertions(+), 4 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 /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T08:08:37.061687+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T08:11:22.633601+00:00. # base of lastest vendoring -ba391e6893 +de61a0f028 diff --git a/third_party/libwebrtc/api/video/corruption_detection/frame_instrumentation_generator.cc b/third_party/libwebrtc/api/video/corruption_detection/frame_instrumentation_generator.cc @@ -43,7 +43,9 @@ namespace { // Avoid holding on to frames that might have been dropped by encoder, as that // can lead to frame buffer pools draining. -constexpr size_t kMaxPendingFrames = 3; +// TODO: bugs.webrtc.org/358039777 - Once we have a reliable signal for dropped +// and completed frames, update this logic with a smarter culling logic. +constexpr size_t kMaxPendingFrames = 2; std::optional<CorruptionDetectionFilterSettings> GetCorruptionFilterSettings( const EncodedImage& encoded_image, @@ -204,6 +206,7 @@ FrameInstrumentationGeneratorImpl::OnEncodedImage( if (!is_key_frame) { return std::nullopt; } + // Sync message only. return data; } } diff --git a/third_party/libwebrtc/api/video/corruption_detection/frame_instrumentation_generator_unittest.cc b/third_party/libwebrtc/api/video/corruption_detection/frame_instrumentation_generator_unittest.cc @@ -705,7 +705,7 @@ TEST(FrameInstrumentationGeneratorTest, QueuesAtMostThreeInputFrames) { .build()); } - EXPECT_THAT(frames_destroyed, ElementsAre(true, false, false, false)); + EXPECT_THAT(frames_destroyed, ElementsAre(true, true, false, false)); generator.reset(); EXPECT_THAT(frames_destroyed, ElementsAre(true, true, true, true));