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 -1
View File
@@ -24,7 +24,7 @@ func (p *Producer) GetTrack(media *streamer.Media, codec *streamer.Codec) *strea
panic("you shall not pass!")
}
track := &streamer.Track{Codec: codec, Direction: media.Direction}
track := streamer.NewTrack(codec, media.Direction)
switch media.Direction {
case streamer.DirectionSendonly: