Check maximum buffer size in ResamplerHelper::MaybeResample Verify that the target sample count does not exceed the maximum allowed size for an AudioFrame. Previously, requesting a resample operation with a high number of channels or a high sample rate could result in a target data size that exceeded the internal limits of the AudioFrame class. This change adds a validation check before starting the resampling process. If the calculated target size—based on the desired sample rate and channel count—surpasses kMaxDataSizeSamples, the operation now safely aborts. In such cases, the error is logged, the audio frame is muted to avoid undefined behavior, and the function returns false. Bug: chromium:486349161 Fixes: chromium:486349161 Change-Id: Ia0d8abcd390f90a590c07c0606f9b6c968f663e6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/454000 Reviewed-by: Per Åhgren <peah@webrtc.org> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47076}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.