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.
/* unblock to allow streaming in PLAYING */
priv->blocked = FALSE;
JBUF_SIGNAL_EVENT (priv);
+ JBUF_SIGNAL_TIMER (priv);
JBUF_UNLOCK (priv);
break;
default:
JBUF_LOCK (priv);
/* block to stop streaming when PAUSED */
priv->blocked = TRUE;
+ unschedule_current_timer (jitterbuffer);
JBUF_UNLOCK (priv);
if (ret != GST_STATE_CHANGE_FAILURE)
ret = GST_STATE_CHANGE_NO_PREROLL;
timer_timeout = test_timeout;
}
}
- if (timer) {
+ if (timer && !priv->blocked) {
GstClock *clock;
GstClockTime sync_time;
GstClockID id;