Address a data race reported by CI (#3273)
in this run https://github.com/livekit/livekit/actions/runs/12396846876/job/34605820002
This commit is contained in:
@@ -183,13 +183,10 @@ func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver, priority
|
||||
})
|
||||
|
||||
if mid != "" {
|
||||
trackInfo := t.TrackInfo()
|
||||
|
||||
trackInfo := t.TrackInfoClone()
|
||||
if priority == 0 {
|
||||
trackInfo = utils.CloneProto(trackInfo)
|
||||
trackInfo.MimeType = receiver.Codec().MimeType
|
||||
trackInfo.Mid = mid
|
||||
t.trackInfo.Store(trackInfo)
|
||||
}
|
||||
|
||||
for i, ci := range trackInfo.Codecs {
|
||||
@@ -199,6 +196,7 @@ func (t *MediaTrackReceiver) SetupReceiver(receiver sfu.TrackReceiver, priority
|
||||
break
|
||||
}
|
||||
}
|
||||
t.trackInfo.Store(trackInfo)
|
||||
}
|
||||
|
||||
t.receivers = receivers
|
||||
|
||||
Reference in New Issue
Block a user