Fix calculation for estimate of dropped packets
Sometimes "expected" seems to fall behind which gives negative values for the estimate.
This commit is contained in:
parent
6d9a2c1df3
commit
ea8f1d2039
|
@ -385,7 +385,8 @@ void uvg_rtp::rtcp::update_session_statistics(uvg_rtp::frame::rtp_frame *frame)
|
|||
int extended_max = p->stats.cycles + p->stats.max_seq;
|
||||
int expected = extended_max - p->stats.base_seq + 1;
|
||||
|
||||
p->stats.dropped_pkts = expected - p->stats.received_pkts;
|
||||
int dropped = expected - p->stats.received_pkts;
|
||||
p->stats.dropped_pkts = dropped >= 0 ? dropped : 0;
|
||||
|
||||
int arrival =
|
||||
p->stats.initial_rtp +
|
||||
|
|
Loading…
Reference in New Issue