mirror of
https://github.com/livekit/livekit.git
synced 2026-11-23 02:29:22 +00:00
Adaptive and minimum protection fed the fraction lost of every reception report into the max-window loss filter. libwebrtc receivers can send a report with each NACK, so a report often covers only a few packets and its fraction lost is very noisy. With 10% random loss, single reports read up to 70%, and the filter kept the maximum. Derive loss from the cumulative counters instead and produce a sample only once it covers at least 20 expected packets, like libwebrtc's SendSideBandwidthEstimation::UpdatePacketsLost. The end-to-end tests now report cumulative loss and the extended highest sequence number in their receiver reports.