Trigger max layer switch when downgrading. (#1398)

When downgrading (could be due to overshoot or opportunistically
locking to a higher layer), need to check if the max layer notification
needs to be done so that dynacast has the right max layer for the
participant corresponding to this downtrack.
This commit is contained in:
Raja Subramanian
2023-02-08 18:54:54 +05:30
committed by GitHub
parent a04e7ce647
commit 95bc5b9849
+4
View File
@@ -1641,6 +1641,10 @@ func (f *Forwarder) getTranslationParamsVideo(extPkt *buffer.ExtPacket, layer in
f.logger.Infow("adjusting overshoot", "current", f.currentLayers, "target", f.targetLayers, "adjuted", layer)
f.currentLayers.Spatial = layer
f.targetLayers.Spatial = layer
if f.currentLayers.Spatial >= f.maxLayers.Spatial || f.currentLayers.Spatial == (f.numAdvertisedLayers-1) {
tp.isSwitchingToMaxLayer = true
}
}
}
}