diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2024-04-04 13:19:18 +0300 |
---|---|---|
committer | Backport Bot <gitlab-backport-bot@gstreamer-foundation.org> | 2024-04-15 01:27:28 +0100 |
commit | 93f93847e8f538f5c76ed4e0788d691f708c6524 (patch) | |
tree | c3b34723a799aca6de3a1c676b299e48570cb838 | |
parent | d2b00b045a7f26668063d0a4d13393f1d320e921 (diff) |
rtpbin: Convert clock-base to extended RTP timestamp correctly
It's not in the same period as the current RTP base time but always in
the very first period. This avoids using it again at a much later time.
The code in question is only triggered with rtcp-sync=rtp-info.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6639>
-rw-r--r-- | subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c index 0fbf0820c1..66ba0d37a2 100644 --- a/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c +++ b/subprojects/gst-plugins-good/gst/rtpmanager/gstrtpbin.c @@ -1588,13 +1588,12 @@ gst_rtp_bin_associate (GstRtpBin * bin, GstRtpBinStream * stream, guint8 len, min = rtp_min = G_MAXINT64; use_rtp = FALSE; if (rtcp_sync == GST_RTP_BIN_RTCP_SYNC_RTP) { - guint64 ext_base; + guint64 ext_base = -1; use_rtp = TRUE; /* signed version for convenience */ clock_base = base_rtptime; - /* deal with possible wrap-around */ - ext_base = base_rtptime; + /* convert to extended RTP time */ rtp_clock_base = gst_rtp_buffer_ext_timestamp (&ext_base, rtp_clock_base); /* sanity check; base rtp and provided clock_base should be close */ if (rtp_clock_base >= clock_base) { |