mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-26 20:31:11 +08:00
remove duplicated code
This commit is contained in:
@@ -139,16 +139,6 @@ func (c *Conn) Accept() error {
|
||||
medias = append(medias, media)
|
||||
}
|
||||
|
||||
for i, track := range c.Receivers {
|
||||
media := &core.Media{
|
||||
Kind: core.GetKind(track.Codec.Name),
|
||||
Direction: core.DirectionSendonly,
|
||||
Codecs: []*core.Codec{track.Codec},
|
||||
ID: "trackID=" + strconv.Itoa(i+len(c.Senders)),
|
||||
}
|
||||
medias = append(medias, media)
|
||||
}
|
||||
|
||||
res.Body, err = core.MarshalSDP(c.SessionName, medias)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user