w3c / webrtc-stats

WebRTC Statistics
https://w3c.github.io/webrtc-stats/
Other
128 stars 47 forks source link

Sender-side packetsReceived can be negative from garbage RRs #772

Open jan-ivar opened 11 months ago

jan-ivar commented 11 months ago

Sender-side packetsReceived is unsigned, yet is a result of a subtraction of two RR values that could be garbage:

image

Having stats reflect garbage input seems helpful for debugging, but it's unspecified what value user agents should report if the result of the subtraction is negative. Changing it to signed seems simplest, and would match packetsLost.

This came up in bug 1853717 which (ended up being a bug in Firefox instead but) raised how to handle garbage RRs from a server.

henbos commented 11 months ago

Having it be signed instead makes sense to be