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

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

No files matched your search

+1
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
+8 -1
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