mirror of
https://github.com/livekit/livekit.git
synced 2026-05-12 08:05:00 +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:
@@ -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