mirror of
https://github.com/livekit/livekit.git
synced 2026-05-15 07:25:30 +00:00
c039769607
When SetMaxSpatialLayer() is called with target/current layers in InvalidLayerSpatial state, opportunistically initialize the target layer to avoid dropped packets during async stream allocator initialization. Guards: - Only sets target if not congestion-throttled (isDeficientLocked) - Does not set current layer (deferred to keyframe-based forwarder start) - Logs at Debug level to avoid log noise This prevents undefined layer state during manual subscription with immediate quality upgrades (WithAutoSubscribe(false) + SetVideoQuality(HIGH)).