mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
rtpjitterbuffer: improve flush and shutdown
There is no need to unschedule the timer in flush-start, flush-stop will remove the timers and unschedule. Unschedule the current timer before attempting to join the timer thread.
This commit is contained in:
parent
3b9e2ee5a0
commit
5dc207948c
1 changed files with 1 additions and 3 deletions
|
@ -1004,9 +1004,6 @@ gst_rtp_jitter_buffer_flush_start (GstRtpJitterBuffer * jitterbuffer)
|
|||
GST_DEBUG_OBJECT (jitterbuffer, "Disabling pop on queue");
|
||||
/* this unblocks any waiting pops on the src pad task */
|
||||
JBUF_SIGNAL_EVENT (priv);
|
||||
/* unlock clock, we just unschedule, the entry will be released by the
|
||||
* locking streaming thread. */
|
||||
unschedule_current_timer (jitterbuffer);
|
||||
JBUF_UNLOCK (priv);
|
||||
}
|
||||
|
||||
|
@ -1137,6 +1134,7 @@ gst_rtp_jitter_buffer_change_state (GstElement * element,
|
|||
JBUF_LOCK (priv);
|
||||
gst_buffer_replace (&priv->last_sr, NULL);
|
||||
priv->timer_running = FALSE;
|
||||
unschedule_current_timer (jitterbuffer);
|
||||
JBUF_SIGNAL_TIMER (priv);
|
||||
JBUF_UNLOCK (priv);
|
||||
g_thread_join (priv->timer_thread);
|
||||
|
|
Loading…
Reference in a new issue