Attempt to avoid out-of-order max subscribed layer notifications. (#1882)
* Check for request layer lock only in the goroutine * check before sending PLI * max layer notifier worker * test cleanup * clean up * do notification in the callback
This commit is contained in:
@@ -35,19 +35,6 @@ func (s *Simulcast) Select(extPkt *buffer.ExtPacket, layer int32) (result VideoL
|
||||
result.IsResuming = true
|
||||
}
|
||||
|
||||
if s.currentLayer.Spatial == s.requestSpatial {
|
||||
result.IsSwitchingToRequestSpatial = true
|
||||
}
|
||||
|
||||
if s.currentLayer.Spatial >= s.maxLayer.Spatial {
|
||||
result.IsSwitchingToMaxSpatial = true
|
||||
result.MaxSpatialLayer = s.currentLayer.Spatial
|
||||
if reason != "" {
|
||||
reason += ", "
|
||||
}
|
||||
reason += "reached max layer"
|
||||
}
|
||||
|
||||
if reason != "" {
|
||||
s.logger.Infow(
|
||||
reason,
|
||||
|
||||
Reference in New Issue
Block a user