Log more around unexpected cases (#2813)
- too many padding packets - also fix cse of snapshot not getting any packets
This commit is contained in:
@@ -38,7 +38,7 @@ const (
|
|||||||
|
|
||||||
cPassthroughNTPTimestamp = true
|
cPassthroughNTPTimestamp = true
|
||||||
|
|
||||||
cSequenceNumberLargeJumpThreshold = 1000
|
cSequenceNumberLargeJumpThreshold = 100
|
||||||
)
|
)
|
||||||
|
|
||||||
// -------------------------------------------------------
|
// -------------------------------------------------------
|
||||||
@@ -583,6 +583,9 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
|
|||||||
endTime := now.startTime
|
endTime := now.startTime
|
||||||
|
|
||||||
packetsExpected := now.extStartSN - then.extStartSN
|
packetsExpected := now.extStartSN - then.extStartSN
|
||||||
|
if then.extStartSN > extHighestSN {
|
||||||
|
packetsExpected = 0
|
||||||
|
}
|
||||||
if packetsExpected > cNumSequenceNumbers {
|
if packetsExpected > cNumSequenceNumbers {
|
||||||
r.logger.Infow(
|
r.logger.Infow(
|
||||||
"too many packets expected in delta",
|
"too many packets expected in delta",
|
||||||
@@ -614,8 +617,10 @@ func (r *rtpStatsBase) deltaInfo(snapshotID uint32, extStartSN uint64, extHighes
|
|||||||
"padding packets more than expected",
|
"padding packets more than expected",
|
||||||
"packetsExpected", packetsExpected,
|
"packetsExpected", packetsExpected,
|
||||||
"packetsPadding", packetsPadding,
|
"packetsPadding", packetsPadding,
|
||||||
|
"packetsLost", packetsLost,
|
||||||
"startSequenceNumber", then.extStartSN,
|
"startSequenceNumber", then.extStartSN,
|
||||||
"endSequenceNumber", now.extStartSN-1,
|
"endSequenceNumber", now.extStartSN-1,
|
||||||
|
"rtpStats", r,
|
||||||
)
|
)
|
||||||
packetsExpected = 0
|
packetsExpected = 0
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user