From 64f82a6a73f92ca137e54f20c3ed59bf518d13ff Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Fri, 18 Mar 2022 10:03:09 +0530 Subject: [PATCH] Fix off by one packets expected (#529) --- pkg/sfu/buffer/rtpstats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sfu/buffer/rtpstats.go b/pkg/sfu/buffer/rtpstats.go index c6bfcd874..a68b83553 100644 --- a/pkg/sfu/buffer/rtpstats.go +++ b/pkg/sfu/buffer/rtpstats.go @@ -682,7 +682,7 @@ func (r *RTPStats) ToProto() *livekit.RTPStats { return nil } - packetsExpected := r.getExtHighestSN() - r.extStartSN + packetsExpected := r.getExtHighestSN() - r.extStartSN + 1 packets := packetsExpected if r.packetsLost < packets {