Commit 6bb26264 authored by Wim Taymans's avatar Wim Taymans

rtpjitterbuffer: reevaluate the current timer after timeout

When we trigger the timeout logic of a timer, reevaluate it because it is
possible that it still has the lowest timeout.
parent 8d021b6e
......@@ -2446,16 +2446,13 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
/* no timestamp, timeout immeditately */
if (test_timeout == -1 || test_timeout <= now) {
if (do_timeout (jitterbuffer, test, now)) {
i--;
if (do_timeout (jitterbuffer, test, now))
len--;
}
} else {
i--;
} else if (timer == NULL || test_timeout < timer_timeout) {
/* find the smallest timeout */
if (timer == NULL || test_timeout < timer_timeout) {
timer = test;
timer_timeout = test_timeout;
}
timer = test;
timer_timeout = test_timeout;
}
}
if (timer) {
......
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