fix panic in forwarder (#268)

Co-authored-by: cnderrauber <zengjie9004@gmail.com>
This commit is contained in:
cnderrauber
2021-12-17 23:51:06 +08:00
committed by GitHub
parent 502c57d787
commit a06edd885e
+1 -1
View File
@@ -602,7 +602,7 @@ func (f *Forwarder) ProvisionalAllocateGetCooperativeTransition() VideoTransitio
minimalLayers := InvalidLayers
bandwidthRequired := int64(0)
for s := int32(0); s <= f.maxLayers.spatial; s++ {
for t := int32(0); s <= f.maxLayers.temporal; t++ {
for t := int32(0); t <= f.maxLayers.temporal; t++ {
if f.provisional.bitrates[s][t] != 0 {
minimalLayers = VideoLayers{spatial: s, temporal: t}
bandwidthRequired = f.provisional.bitrates[s][t]