mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
rtpjitterbuffer: Check the exit condition after executing timers
The do_expected_timeout() function may release the JBUF_LOCK, so we need to check if nothing wanted the timer thread to exit after this call. The side effect was that we may endup going back into waiting for a timer which will cause arbitrary delay on tear down (or deadlock when test clock is used). Fixes #653
This commit is contained in:
parent
fd6cd6f545
commit
db187eec19
1 changed files with 6 additions and 1 deletions
|
@ -4044,9 +4044,14 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
|
|||
}
|
||||
} while ((timer = rtp_timer_queue_pop_until (priv->timers, now)));
|
||||
|
||||
/* execetute the remaining timers */
|
||||
/* execute the remaining timers */
|
||||
while ((timer = (RtpTimer *) g_queue_pop_head_link (&timers)))
|
||||
do_timeout (jitterbuffer, timer, now);
|
||||
|
||||
/* do_expected_timeout(), called by do_timeout will drop the
|
||||
* JBUF_LOCK, so we need to check if we are still running */
|
||||
if (!priv->timer_running)
|
||||
goto stopping;
|
||||
}
|
||||
|
||||
timer = rtp_timer_queue_peek_earliest (priv->timers);
|
||||
|
|
Loading…
Reference in a new issue