mirror of https://github.com/jech/galene.git
Protect against negotiation inconsistencies.
This is not an issue in the current code, assuming that clients negotiate correctly, but will become one once we implement codec flexibility.
This commit is contained in:
parent
2dfa175bd1
commit
f4379f7a8c
|
@ -535,6 +535,15 @@ func gotAnswer(c *webClient, id string, answer webrtc.SessionDescription) error
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, t := range down.tracks {
|
||||||
|
local := t.track.Codec()
|
||||||
|
remote := t.remote.Codec()
|
||||||
|
if local.MimeType != remote.MimeType ||
|
||||||
|
local.ClockRate != remote.ClockRate {
|
||||||
|
return errors.New("negotiation failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
err = down.flushICECandidates()
|
err = down.flushICECandidates()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("ICE: %v", err)
|
log.Printf("ICE: %v", err)
|
||||||
|
|
Loading…
Reference in New Issue