Skip video layer update if sub muted (#1929)
Previous change to check for non-zero width caused test failures as subscribed track settings can use the quality field and not necessarily width/height.
This commit is contained in:
@@ -211,18 +211,15 @@ func (t *SubscribedTrack) UpdateVideoLayer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
settings := t.settings.Load()
|
settings := t.settings.Load()
|
||||||
if settings == nil {
|
if settings == nil || settings.Disabled {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
t.logger.Debugw("updating video layer", "settings", settings)
|
t.logger.Debugw("updating video layer", "settings", settings)
|
||||||
|
spatial := t.spatialLayerFromSettings(settings)
|
||||||
if settings.Width > 0 || settings.Fps > 0 {
|
t.DownTrack().SetMaxSpatialLayer(spatial)
|
||||||
spatial := t.spatialLayerFromSettings(settings)
|
if settings.Fps > 0 {
|
||||||
t.DownTrack().SetMaxSpatialLayer(spatial)
|
t.DownTrack().SetMaxTemporalLayer(t.MediaTrack().GetTemporalLayerForSpatialFps(spatial, settings.Fps, t.DownTrack().Codec().MimeType))
|
||||||
if settings.Fps > 0 {
|
|
||||||
t.DownTrack().SetMaxTemporalLayer(t.MediaTrack().GetTemporalLayerForSpatialFps(spatial, settings.Fps, t.DownTrack().Codec().MimeType))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user