mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 03:05:32 +00:00
rtpjitterbuffer: pause timer when PAUSED
Also pause the timer when we go to the PAUSED state. It is possible that we don't have a clock or base-time in PAUSED to perform the timeouts.
This commit is contained in:
parent
ca9c8ce79a
commit
e21c6ddf74
1 changed files with 3 additions and 1 deletions
|
@ -1199,6 +1199,7 @@ gst_rtp_jitter_buffer_change_state (GstElement * element,
|
||||||
/* unblock to allow streaming in PLAYING */
|
/* unblock to allow streaming in PLAYING */
|
||||||
priv->blocked = FALSE;
|
priv->blocked = FALSE;
|
||||||
JBUF_SIGNAL_EVENT (priv);
|
JBUF_SIGNAL_EVENT (priv);
|
||||||
|
JBUF_SIGNAL_TIMER (priv);
|
||||||
JBUF_UNLOCK (priv);
|
JBUF_UNLOCK (priv);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1218,6 +1219,7 @@ gst_rtp_jitter_buffer_change_state (GstElement * element,
|
||||||
JBUF_LOCK (priv);
|
JBUF_LOCK (priv);
|
||||||
/* block to stop streaming when PAUSED */
|
/* block to stop streaming when PAUSED */
|
||||||
priv->blocked = TRUE;
|
priv->blocked = TRUE;
|
||||||
|
unschedule_current_timer (jitterbuffer);
|
||||||
JBUF_UNLOCK (priv);
|
JBUF_UNLOCK (priv);
|
||||||
if (ret != GST_STATE_CHANGE_FAILURE)
|
if (ret != GST_STATE_CHANGE_FAILURE)
|
||||||
ret = GST_STATE_CHANGE_NO_PREROLL;
|
ret = GST_STATE_CHANGE_NO_PREROLL;
|
||||||
|
@ -2640,7 +2642,7 @@ wait_next_timeout (GstRtpJitterBuffer * jitterbuffer)
|
||||||
timer_timeout = test_timeout;
|
timer_timeout = test_timeout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (timer) {
|
if (timer && !priv->blocked) {
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockTime sync_time;
|
GstClockTime sync_time;
|
||||||
GstClockID id;
|
GstClockID id;
|
||||||
|
|
Loading…
Reference in a new issue