mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45:58 +01:00
Wait for answer before sending data.
This commit is contained in:
parent
47d23658b5
commit
a290325320
1 changed files with 8 additions and 1 deletions
|
@ -702,13 +702,16 @@ func addDownTrack(c *client, conn *downConnection, remoteTrack *upTrack, remoteC
|
||||||
rate: estimator.New(time.Second),
|
rate: estimator.New(time.Second),
|
||||||
}
|
}
|
||||||
conn.tracks = append(conn.tracks, track)
|
conn.tracks = append(conn.tracks, track)
|
||||||
remoteTrack.addLocal(track)
|
|
||||||
|
|
||||||
go rtcpDownListener(conn, track, s)
|
go rtcpDownListener(conn, track, s)
|
||||||
|
|
||||||
return s, nil
|
return s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func activateDownTrack(conn *downConnection, track *downTrack) {
|
||||||
|
track.remote.addLocal(track)
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
minLossRate = 9600
|
minLossRate = 9600
|
||||||
initLossRate = 512 * 1000
|
initLossRate = 512 * 1000
|
||||||
|
@ -1003,6 +1006,10 @@ func gotAnswer(c *client, id string, answer webrtc.SessionDescription) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, t := range conn.tracks {
|
||||||
|
activateDownTrack(conn, t)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue