mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Improve timing of nackWriter.
This commit is contained in:
parent
b46da173e5
commit
2efb5b3cea
1 changed files with 4 additions and 2 deletions
|
@ -384,17 +384,19 @@ func rtpWriterLoop(writer *rtpWriter, up *rtpUpConnection, track *rtpUpTrack) {
|
|||
func nackWriter(conn *rtpUpConnection, track *rtpUpTrack) {
|
||||
// a client might send us a NACK for a packet that has already
|
||||
// been nacked by the reader loop. Give recovery a chance.
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
track.mu.Lock()
|
||||
nacks := track.bufferedNACKs
|
||||
track.bufferedNACKs = nil
|
||||
track.mu.Unlock()
|
||||
|
||||
if !track.hasRtcpFb("nack", "") {
|
||||
if len(nacks) == 0 || !track.hasRtcpFb("nack", "") {
|
||||
return
|
||||
}
|
||||
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
|
||||
// drop any nacks before the last keyframe
|
||||
var cutoff uint16
|
||||
found, seqno, _ := track.cache.KeyframeSeqno()
|
||||
|
|
Loading…
Reference in a new issue