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.
This commit is contained in:
parent
8d021b6ede
commit
6bb2626498
@ -2446,18 +2446,15 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
|
|||||||
|
|
||||||
/* no timestamp, timeout immeditately */
|
/* no timestamp, timeout immeditately */
|
||||||
if (test_timeout == -1 || test_timeout <= now) {
|
if (test_timeout == -1 || test_timeout <= now) {
|
||||||
if (do_timeout (jitterbuffer, test, now)) {
|
if (do_timeout (jitterbuffer, test, now))
|
||||||
i--;
|
|
||||||
len--;
|
len--;
|
||||||
}
|
i--;
|
||||||
} else {
|
} else if (timer == NULL || test_timeout < timer_timeout) {
|
||||||
/* find the smallest timeout */
|
/* find the smallest timeout */
|
||||||
if (timer == NULL || test_timeout < timer_timeout) {
|
|
||||||
timer = test;
|
timer = test;
|
||||||
timer_timeout = test_timeout;
|
timer_timeout = test_timeout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (timer) {
|
if (timer) {
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockTime sync_time;
|
GstClockTime sync_time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user