Log more around unexpected cases (#2813)

- too many padding packets
- also fix cse of snapshot not getting any packets
This commit is contained in:
Raja Subramanian
2024-06-23 00:33:56 +05:30
committed by GitHub
parent 091eab556d
commit cdb5f3ed68

View File

@@ -38,7 +38,7 @@ const (
cPassthroughNTPTimestamp = true
cSequenceNumberLargeJumpThreshold = 1000
cSequenceNumberLargeJumpThreshold = 100
)
// -------------------------------------------------------
@@ -583,6 +583,9 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
endTime := now.startTime
packetsExpected := now.extStartSN - then.extStartSN
if then.extStartSN > extHighestSN {
packetsExpected = 0
}
if packetsExpected > cNumSequenceNumbers {
r.logger.Infow(
"too many packets expected in delta",
@@ -614,8 +617,10 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
"padding packets more than expected",
"packetsExpected", packetsExpected,
"packetsPadding", packetsPadding,
"packetsLost", packetsLost,
"startSequenceNumber", then.extStartSN,
"endSequenceNumber", now.extStartSN-1,
"rtpStats", r,
)
packetsExpected = 0
} else {