commit b72bee702ed0f8dd225251404e870c0a4791a8ee parent 280cfdbc030546453221f8d6b97699bf182ef0b4 Author: Dan Baker <dbaker@mozilla.com> Date: Wed, 22 Oct 2025 15:49:05 -0600 Bug 1995393 - Vendor libwebrtc from 85642b2e08 Upstream commit: https://webrtc.googlesource.com/src/+/85642b2e0881e2dc8466dffd173a33873a5e4d97 Add modernize-use-std-numbers to .clang-tidy Drive-by: Exclude from analysis a couple of .get() that clang-tidy is wrong about removing. Bug: webrtc:424706384 Change-Id: I843170b04ceed70f4eb6f131cc1f0ad72394c5b7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403540 Reviewed-by: Jeremy Leconte <jleconte@google.com> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45317} Diffstat:
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/third_party/libwebrtc/.clang-tidy b/third_party/libwebrtc/.clang-tidy @@ -3,8 +3,12 @@ Checks: '-*, llvm-namespace-comment, modernize-use-override, + modernize-use-std-numbers, readability-container-size-empty, readability-static-definition-in-anonymous-namespace, readability-redundant-smartptr-get, readability-redundant-declaration' + CheckOptions: + # The default threshold gives false positives in test data + modernize-use-std-numbers.DiffThreshold: 0.00001 ... 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-10-22T21:46:17.788142+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T21:48:46.465357+00:00. # base of lastest vendoring -7acf831822 +85642b2e08 diff --git a/third_party/libwebrtc/common_audio/resampler/sinc_resampler.cc b/third_party/libwebrtc/common_audio/resampler/sinc_resampler.cc @@ -163,12 +163,17 @@ SincResampler::SincResampler(double io_sample_rate_ratio, Flush(); RTC_DCHECK_GT(block_size_, kKernelSize); + // NOLINTBEGIN (readability-redundant-smartptr-get) + // clang-tidy tries to remove the .get() in calls to sizeof(). This will + // not compile. + // Bug report ID: 437035885 memset(kernel_storage_.get(), 0, sizeof(*kernel_storage_.get()) * kKernelStorageSize); memset(kernel_pre_sinc_storage_.get(), 0, sizeof(*kernel_pre_sinc_storage_.get()) * kKernelStorageSize); memset(kernel_window_storage_.get(), 0, sizeof(*kernel_window_storage_.get()) * kKernelStorageSize); + // NOLINTEND InitializeKernel(); } @@ -319,6 +324,7 @@ void SincResampler::Resample(size_t frames, float* destination) { // Step (3) -- Copy r3_, r4_ to r1_, r2_. // This wraps the last input frames back to the start of the buffer. + // NOLINTNEXTLINE(readability-redundant-smartptr-get) memcpy(r1_, r3_, sizeof(*input_buffer_.get()) * kKernelSize); // Step (4) -- Reinitialize regions if necessary. @@ -339,6 +345,7 @@ size_t SincResampler::ChunkSize() const { void SincResampler::Flush() { virtual_source_idx_ = 0; buffer_primed_ = false; + // NOLINTNEXTLINE(readability-redundant-smartptr-get) memset(input_buffer_.get(), 0, sizeof(*input_buffer_.get()) * input_buffer_size_); UpdateRegions(false); diff --git a/third_party/libwebrtc/modules/audio_coding/codecs/opus/test/blocker.cc b/third_party/libwebrtc/modules/audio_coding/codecs/opus/test/blocker.cc @@ -119,6 +119,7 @@ Blocker::Blocker(size_t chunk_size, RTC_CHECK_LE(num_output_channels_, num_input_channels_); RTC_CHECK_LE(shift_amount_, block_size_); + // NOLINTNEXTLINE(readability-redundant-smartptr-get) memcpy(window_.get(), window, block_size_ * sizeof(*window_.get())); input_buffer_.MoveReadPositionBackward(initial_delay_); }