Commit e88942c9 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Reduce the NACK delay.

We bound the NACK delay to 2 packets, which is what TCP does.
Thus, reducing the delay should be safe.
parent 5d38b0a2
...@@ -167,9 +167,10 @@ func readLoop(conn *rtpUpConnection, track *rtpUpTrack) { ...@@ -167,9 +167,10 @@ func readLoop(conn *rtpUpConnection, track *rtpUpTrack) {
if (delta & 0x8000) != 0 { if (delta & 0x8000) != 0 {
delta = 0 delta = 0
} }
// send a NACK if a packet is late by 65ms or 2 packets, // send a NACK if a packet is late by 20ms or 2 packets,
// whichever is more // whichever is more. Since TCP sends a dupack after 2 packets,
packets := rate / 16 // this should be safe.
packets := rate / 50
if packets > 24 { if packets > 24 {
packets = 24 packets = 24
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment