jitterbuffer: start out active and not buffering

There is no need to set the latency in the jittebuffer in _init, we will set
that later when going to PAUSED.
Set the jitterbuffer active and not buffering when starting.
This commit is contained in:
Wim Taymans 2010-02-12 16:47:29 +01:00
parent 8bbfd94c25
commit 772eca5aff

View file

@ -462,7 +462,6 @@ gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer,
priv->do_lost = DEFAULT_DO_LOST; priv->do_lost = DEFAULT_DO_LOST;
priv->jbuf = rtp_jitter_buffer_new (); priv->jbuf = rtp_jitter_buffer_new ();
rtp_jitter_buffer_set_delay (priv->jbuf, priv->latency_ns);
priv->jbuf_lock = g_mutex_new (); priv->jbuf_lock = g_mutex_new ();
priv->jbuf_cond = g_cond_new (); priv->jbuf_cond = g_cond_new ();
@ -948,6 +947,8 @@ gst_rtp_jitter_buffer_change_state (GstElement * element,
/* reset skew detection initialy */ /* reset skew detection initialy */
rtp_jitter_buffer_reset_skew (priv->jbuf); rtp_jitter_buffer_reset_skew (priv->jbuf);
rtp_jitter_buffer_set_delay (priv->jbuf, priv->latency_ns); rtp_jitter_buffer_set_delay (priv->jbuf, priv->latency_ns);
rtp_jitter_buffer_set_buffering (priv->jbuf, FALSE);
priv->active = TRUE;
JBUF_UNLOCK (priv); JBUF_UNLOCK (priv);
break; break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING: case GST_STATE_CHANGE_PAUSED_TO_PLAYING: