From 1b09fc9721b2a03b73fe3d65c861b02d6a5686bc Mon Sep 17 00:00:00 2001 From: Paul Wells Date: Sat, 1 Apr 2023 12:39:13 -0700 Subject: [PATCH] fix panic in rtpstats (#1570) --- pkg/sfu/buffer/rtpstats.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/sfu/buffer/rtpstats.go b/pkg/sfu/buffer/rtpstats.go index 8c4c9da37..f1176f5d2 100644 --- a/pkg/sfu/buffer/rtpstats.go +++ b/pkg/sfu/buffer/rtpstats.go @@ -1526,6 +1526,10 @@ func AggregateRTPDeltaInfo(deltaInfoList []*RTPDeltaInfo) *RTPDeltaInfo { firs := uint32(0) for _, deltaInfo := range deltaInfoList { + if deltaInfo == nil { + continue + } + if startTime.IsZero() || startTime.After(deltaInfo.StartTime) { startTime = deltaInfo.StartTime }