mirror of
https://github.com/jech/galene.git
synced 2024-11-25 10:05:58 +01:00
Protect against tracks without a stream.
This commit is contained in:
parent
e81ee4af5e
commit
09c5ba0d06
2 changed files with 5 additions and 1 deletions
|
@ -368,7 +368,7 @@ func addDownTrackUnlocked(conn *rtpDownConnection, remoteTrack *rtpUpTrack) erro
|
|||
id = remoteTrack.track.Kind().String()
|
||||
}
|
||||
msid := remoteTrack.track.StreamID()
|
||||
if msid == "" {
|
||||
if msid == "" || msid == "-" {
|
||||
log.Println("Got track with empty msid")
|
||||
msid = remoteTrack.conn.Label()
|
||||
}
|
||||
|
|
|
@ -677,6 +677,10 @@ ServerConnection.prototype.gotOffer = async function(id, label, source, username
|
|||
};
|
||||
|
||||
c.pc.ontrack = function(e) {
|
||||
if(e.streams.length < 1) {
|
||||
console.error("Got track with no stream");
|
||||
return;
|
||||
}
|
||||
c.stream = e.streams[0];
|
||||
let changed = recomputeUserStreams(sc, source, c);
|
||||
if(c.ondowntrack) {
|
||||
|
|
Loading…
Reference in a new issue