Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions rtc-interceptor/src/report/receiver_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ impl ReceiverStream {

self.total_lost += total_lost_since_report;

// allow up to 24 bits
if total_lost_since_report > 0xFFFFFF {
total_lost_since_report = 0xFFFFFF;
// allow up to signed 24 bits (RFC 3550 §6.4.1: total_lost is i32)
if total_lost_since_report > 0x7FFFFF {
total_lost_since_report = 0x7FFFFF;
}
if self.total_lost > 0xFFFFFF {
self.total_lost = 0xFFFFFF
if self.total_lost > 0x7FFFFF {
self.total_lost = 0x7FFFFF
}

// Calculate DLSR (Delay Since Last SR) - RFC 3550
Expand Down