Check layer value in dependency descriptor and keep it in bounds. (#4739)

This commit is contained in:
Raja Subramanian
2026-08-11 12:04:19 +05:30
committed by GitHub
parent 32368f79d2
commit 7f1c175a38
2 changed files with 14 additions and 2 deletions
+3 -1
View File
@@ -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()