fix subscription update on codec change (#757)
This commit is contained in:
@@ -694,7 +694,8 @@ func (d *DownTrack) SetMaxSpatialLayer(spatialLayer int32) {
|
||||
return
|
||||
}
|
||||
|
||||
if d.onMaxLayerChanged != nil && d.kind == webrtc.RTPCodecTypeVideo && maxLayers.SpatialGreaterThanOrEqual(currentLayers) {
|
||||
if d.onMaxLayerChanged != nil && d.kind == webrtc.RTPCodecTypeVideo &&
|
||||
maxLayers.SpatialGreaterThanOrEqual(currentLayers) && d.bound.Load() {
|
||||
//
|
||||
// Notify when new max is
|
||||
// 1. Equal to current -> already locked to the new max
|
||||
|
||||
Reference in New Issue
Block a user