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:
Wim Taymans 2009-10-12 11:54:07 +02:00
parent 74a3be350d
commit ab73603031

View file

@ -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;