[M148] Fix TOCTOU race in RtpVideoSender::OnVideoLayersAllocationUpdated RtpVideoSender::OnVideoLayersAllocationUpdated runs on the encoder thread, checks if it's active, and then posts a task to the transport queue to update module status. If SetSending(false) is called on the transport queue before the posted task runs, the task would previously re-register modules in PacketRouter even though active_ was false. This lead to dangling pointers in PacketRouter when the RtpVideoSender was destroyed. This CL adds an IsActive() check inside the posted task to ensure we don't re-register modules if the sender has been deactivated. (cherry picked from commit 77d265670fa7d7f358c86c54704a6e97c27a6005) Bug: chromium:500767595 Test: RtpVideoSenderTest.PostTaskRaceDoesNotLeadToDanglingPointer Change-Id: I18827c34bece7f5ebc41d159d9e19e356afbc404 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/462880 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Original-Commit-Position: refs/heads/main@{#47384} Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/465961 Cr-Commit-Position: refs/branch-heads/7778@{#5} Cr-Branched-From: ca896b7ffef011bbf6957c99d413c5aac602c99f-refs/heads/main@{#47319}
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.