Get next higher using bit rate. (#1960)

This commit is contained in:
Raja Subramanian
2023-08-11 17:22:56 +05:30
committed by GitHub
parent 5c0a4beb61
commit ce1fde451c
2 changed files with 12 additions and 9 deletions
+4 -1
View File
@@ -1220,7 +1220,10 @@ func (f *Forwarder) GetNextHigherTransition(brs Bitrates, allowOvershoot bool) (
for s := minSpatial; s <= maxSpatial; s++ {
for t := minTemporal; t <= maxTemporal; t++ {
bandwidthRequested := brs[s][t]
if bandwidthRequested == 0 {
// traverse till finding a layer requiring more bits.
// NOTE: it possible that higher temporal layer of lower spatial layer
// could use more bits than lower temporal layer of higher spatial layer.
if bandwidthRequested == 0 || bandwidthRequested < alreadyAllocated {
continue
}