mirror of
https://github.com/livekit/livekit.git
synced 2026-07-28 16:29:28 +00:00
Avoid divide-by-zero (#1141)
This commit is contained in:
@@ -1187,6 +1187,10 @@ func (r *RTPStats) getAndResetSnapshot(snapshotId uint32) (*Snapshot, *Snapshot)
|
||||
// ----------------------------------
|
||||
|
||||
func AggregateRTPStats(statsList []*livekit.RTPStats) *livekit.RTPStats {
|
||||
if len(statsList) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
startTime := time.Time{}
|
||||
endTime := time.Time{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user