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:
Raja Subramanian
2024-12-19 23:16:48 +05:30
committed by GitHub
parent 1084866781
commit 3251156bd3
+2 -4
View File
@@ -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