mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
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
1 changed files with 5 additions and 2 deletions
|
@ -674,9 +674,12 @@ gst_rtp_jitter_buffer_set_active (GstRtpJitterBuffer * jbuf, gboolean active,
|
|||
JBUF_SIGNAL (priv);
|
||||
}
|
||||
if ((head = rtp_jitter_buffer_peek (priv->jbuf))) {
|
||||
last_out = GST_BUFFER_TIMESTAMP (head);
|
||||
} else
|
||||
/* head buffer timestamp and offset gives our output time */
|
||||
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;
|
||||
}
|
||||
JBUF_UNLOCK (priv);
|
||||
|
||||
return last_out;
|
||||
|
|
Loading…
Reference in a new issue