mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Work around empty track id and msid.
This commit is contained in:
parent
5ad0244267
commit
d236f4c6df
1 changed files with 18 additions and 2 deletions
|
@ -361,9 +361,25 @@ func addDownTrackUnlocked(conn *rtpDownConnection, remoteTrack *rtpUpTrack, remo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
id := remoteTrack.track.ID()
|
||||||
|
if id == "" {
|
||||||
|
log.Println("Got track with empty id")
|
||||||
|
id = remoteTrack.track.RID()
|
||||||
|
}
|
||||||
|
if id == "" {
|
||||||
|
id = remoteTrack.track.Kind().String()
|
||||||
|
}
|
||||||
|
msid := remoteTrack.track.StreamID()
|
||||||
|
if msid == "" {
|
||||||
|
log.Println("Got track with empty msid")
|
||||||
|
msid = remoteConn.Label()
|
||||||
|
}
|
||||||
|
if msid == "" {
|
||||||
|
msid = "dummy"
|
||||||
|
}
|
||||||
|
|
||||||
local, err := webrtc.NewTrackLocalStaticRTP(
|
local, err := webrtc.NewTrackLocalStaticRTP(
|
||||||
remoteTrack.Codec(),
|
remoteTrack.Codec(), id, msid,
|
||||||
remoteTrack.track.ID(), remoteTrack.track.StreamID(),
|
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue