Temporary change: use pre-defined rids (#3767)
To address a compatibility issue across relay. Will revert this once the compatibility is addressed.
This commit is contained in:
+3
-2
@@ -383,7 +383,7 @@ func (w *WebRTCReceiver) AddUpTrack(track TrackRemote, buff *buffer.Buffer) erro
|
||||
|
||||
layer := int32(0)
|
||||
if w.Kind() == webrtc.RTPCodecTypeVideo && !w.isSVC {
|
||||
layer = buffer.GetSpatialLayerForRid(track.RID(), w.trackInfo.Load())
|
||||
layer = buffer.RidToSpatialLayer(track.RID(), w.trackInfo.Load(), buffer.DefaultVideoLayersRid)
|
||||
}
|
||||
if layer < 0 {
|
||||
w.logger.Warnw(
|
||||
@@ -499,7 +499,8 @@ func (w *WebRTCReceiver) notifyMaxExpectedLayer(layer int32) {
|
||||
|
||||
expectedBitrate := int64(0)
|
||||
for _, vl := range ti.Layers {
|
||||
if vl.SpatialLayer <= layer {
|
||||
l := buffer.VideoQualityToSpatialLayer(vl.Quality, ti)
|
||||
if l <= layer {
|
||||
expectedBitrate += int64(vl.Bitrate)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user