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 {
|
func AggregateRTPStats(statsList []*livekit.RTPStats) *livekit.RTPStats {
|
||||||
|
if len(statsList) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
startTime := time.Time{}
|
startTime := time.Time{}
|
||||||
endTime := time.Time{}
|
endTime := time.Time{}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user