prevent uint overflow setting packet not found count (#4169)

This commit is contained in:
Paul Wells
2025-12-17 06:54:23 -08:00
committed by GitHub
parent 5c841b8ea1
commit 462ec324be
2 changed files with 10 additions and 2 deletions
@@ -256,3 +256,11 @@ func Test_RTPStatsReceiver_Restart(t *testing.T) {
r.Stop()
}
func Test_RTPStatsSender_getIntervalStats(t *testing.T) {
t.Run("packetsNotFoundMetadata should match lost packets", func(t *testing.T) {
r := NewRTPStatsSender(RTPStatsParams{}, 1024)
stats := r.getIntervalStats(0, 10000, 10000)
require.EqualValues(t, 8977, stats.packetsNotFoundMetadata)
})
}