jitterbuffer: add ts-offset to timestamp
Add the ts-offset to the buffer timestamp to get the final output timestamp of the buffer.
This commit is contained in:
parent
74a3be350d
commit
ab73603031
@ -674,9 +674,12 @@ gst_rtp_jitter_buffer_set_active (GstRtpJitterBuffer * jbuf, gboolean active,
|
|||||||
JBUF_SIGNAL (priv);
|
JBUF_SIGNAL (priv);
|
||||||
}
|
}
|
||||||
if ((head = rtp_jitter_buffer_peek (priv->jbuf))) {
|
if ((head = rtp_jitter_buffer_peek (priv->jbuf))) {
|
||||||
last_out = GST_BUFFER_TIMESTAMP (head);
|
/* head buffer timestamp and offset gives our output time */
|
||||||
} else
|
last_out = GST_BUFFER_TIMESTAMP (head) + priv->ts_offset;
|
||||||
|
} else {
|
||||||
|
/* use last known time when the buffer is empty */
|
||||||
last_out = priv->last_out_time;
|
last_out = priv->last_out_time;
|
||||||
|
}
|
||||||
JBUF_UNLOCK (priv);
|
JBUF_UNLOCK (priv);
|
||||||
|
|
||||||
return last_out;
|
return last_out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user