Commit 40899379 authored by Alessandro Decina's avatar Alessandro Decina
Browse files

rtpjitterbuffer: move some initialization code from change_state to _init.

Set ->active to TRUE in _init so it can be set to FALSE after creating the
jitterbuffer and it won't be mistakenly reset to TRUE in the change_state
This is needed to start the jitterbuffer as inactive when rtpbin is buffering.
parent ffc2da30
...@@ -469,6 +469,7 @@ gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer, ...@@ -469,6 +469,7 @@ gst_rtp_jitter_buffer_init (GstRtpJitterBuffer * jitterbuffer,
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); rtp_jitter_buffer_set_buffering (priv->jbuf, FALSE);
priv->active = TRUE;
priv->srcpad = priv->srcpad =
gst_pad_new_from_static_template (&gst_rtp_jitter_buffer_src_template, gst_pad_new_from_static_template (&gst_rtp_jitter_buffer_src_template,
...@@ -949,11 +950,6 @@ gst_rtp_jitter_buffer_change_state (GstElement * element, ...@@ -949,11 +950,6 @@ gst_rtp_jitter_buffer_change_state (GstElement * element,
priv->last_pt = -1; priv->last_pt = -1;
/* block until we go to PLAYING */ /* block until we go to PLAYING */
priv->blocked = TRUE; priv->blocked = TRUE;
/* reset skew detection initialy */
rtp_jitter_buffer_reset_skew (priv->jbuf);
rtp_jitter_buffer_set_delay (priv->jbuf, priv->latency_ns);
rtp_jitter_buffer_set_buffering (priv->jbuf, FALSE);
priv->active = TRUE;
break; break;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment