mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
rtpjitterbuffer: Fix calculation of reference timestamp metadata
Add support for RTCP SRs that contain RTP timestamps later than the current timestamps in the RTP stream packet buffers. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3019>
This commit is contained in:
parent
6a8a20ff92
commit
e64a5b9a85
1 changed files with 10 additions and 3 deletions
|
@ -3489,9 +3489,16 @@ gst_rtp_jitter_buffer_chain (GstPad * pad, GstObject * parent,
|
||||||
|
|
||||||
ext_time = gst_rtp_buffer_ext_timestamp (&ext_time, rtptime);
|
ext_time = gst_rtp_buffer_ext_timestamp (&ext_time, rtptime);
|
||||||
|
|
||||||
ntp_time =
|
if (ext_time >= priv->last_known_ext_rtptime) {
|
||||||
priv->last_known_ntpnstime + gst_util_uint64_scale (ext_time -
|
ntp_time =
|
||||||
priv->last_known_ext_rtptime, GST_SECOND, priv->clock_rate);
|
priv->last_known_ntpnstime + gst_util_uint64_scale (ext_time -
|
||||||
|
priv->last_known_ext_rtptime, GST_SECOND, priv->clock_rate);
|
||||||
|
} else {
|
||||||
|
ntp_time =
|
||||||
|
priv->last_known_ntpnstime -
|
||||||
|
gst_util_uint64_scale (priv->last_known_ext_rtptime - ext_time,
|
||||||
|
GST_SECOND, priv->clock_rate);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->add_reference_timestamp_meta && GST_CLOCK_TIME_IS_VALID (ntp_time)
|
if (priv->add_reference_timestamp_meta && GST_CLOCK_TIME_IS_VALID (ntp_time)
|
||||||
|
|
Loading…
Reference in a new issue