Skip to content

rtpjitterbuffer: Avoid integer overflow in max saveable packets calculation with negative offset

The timestamp offset can be negative, and it can be a bigger negative number than the latency introduced by the rtpjitterbuffer so the overall timeout offset can be negative.

Using the negative offset for calculating how many packets can still arrive in time when encountering a lost packet in an equidistant stream would then overflow and instead of considering fewer packets lost a lot more packets are considered lost.

Merge request reports