mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 19:32:41 +00:00
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:
1 parent
a04e7ce647
commit
95bc5b9849
1 file changed
+4
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user