Check layer value in dependency descriptor and keep it in bounds. (#4739)
This commit is contained in:
@@ -215,7 +215,9 @@ func (s *StreamTrackerDependencyDescriptor) Observe(temporalLayer int32, pktSize
|
||||
continue
|
||||
}
|
||||
|
||||
s.bytesForBitrate[dt.Layer.Spatial][dt.Layer.Temporal] += int64(pktSize)
|
||||
if int(dt.Layer.Spatial) < len(s.bytesForBitrate) && int(dt.Layer.Temporal) < len(s.bytesForBitrate[dt.Layer.Spatial]) {
|
||||
s.bytesForBitrate[dt.Layer.Spatial][dt.Layer.Temporal] += int64(pktSize)
|
||||
}
|
||||
}
|
||||
|
||||
s.lock.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user