Suppress error log of setPrefferedCodec for simulcast codec track (#1682)

This commit is contained in:
cnderrauber
2023-05-04 15:14:20 +08:00
committed by GitHub
parent 5fcd682fb0
commit 298ebaee78
2 changed files with 9 additions and 1 deletions

View File

@@ -190,6 +190,7 @@ func (t *MediaTrack) SetPendingCodecSid(codecs []*livekit.SimulcastCodec) {
}
}
t.params.TrackInfo = ti
t.MediaTrackReceiver.UpdateTrackInfo(ti)
}
// AddReceiver adds a new RTP receiver to the track, returns true when receiver represents a new codec

View File

@@ -112,8 +112,15 @@ func (p *ParticipantImpl) setCodecPreferencesVideoForPublisher(offer webrtc.Sess
continue
}
var info *livekit.TrackInfo
p.pendingTracksLock.RLock()
_, info := p.getPendingTrack(streamID, livekit.TrackType_VIDEO)
mt := p.getPublishedTrackBySdpCid(streamID)
if mt != nil {
info = mt.ToProto()
} else {
_, info = p.getPendingTrack(streamID, livekit.TrackType_VIDEO)
}
if info == nil {
p.pendingTracksLock.RUnlock()
continue