Fix race condition in startReceiver

startReceiver doesn't hold the lock when getting the SSRC. Use the
thread safe accessor
This commit is contained in:
Sean DuBois
2021-09-02 15:59:28 -04:00
parent 7e5b9c320f
commit d5095a1464

View File

@@ -1181,7 +1181,7 @@ func (pc *PeerConnection) startReceiver(incoming trackDetails, receiver *RTPRece
}
for _, t := range receiver.Tracks() {
if t.ssrc == 0 {
if t.SSRC() == 0 {
return
}