Fix race (concurency) for Track

This commit is contained in:
Alexey Khit
2022-11-22 20:03:36 +03:00
parent 3d6472cfb1
commit 0e281e36d3
6 changed files with 15 additions and 24 deletions
+1 -4
View File
@@ -192,10 +192,7 @@ func (c *Client) getTracks() error {
}
c.medias = append(c.medias, media)
track := &streamer.Track{
Direction: streamer.DirectionSendonly,
Codec: codec,
}
track := streamer.NewTrack(codec, streamer.DirectionSendonly)
c.tracks[msg.TrackID] = track
case "mp4a": // mp4a.40.2