[Bug 719383] rtpbasepayload: Perfect timestamps incorrectly computed.
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Dec 3 06:15:40 PST 2013
https://bugzilla.gnome.org/show_bug.cgi?id=719383
GStreamer | gst-plugins-base | git
Wim Taymans <wim.taymans> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #262901|none |rejected
status| |
--- Comment #6 from Wim Taymans <wim.taymans at gmail.com> 2013-12-03 14:15:38 UTC ---
(From update of attachment 262901)
>From 98da63a53ccb970b8aec3de500acadb145d5b056 Mon Sep 17 00:00:00 2001
>From: Sebastian Rasmussen <sebrn at axis.com>
>Date: Mon, 25 Nov 2013 23:53:19 +0100
>Subject: [PATCH 2/2] rtpbasepayload: Fix wrongly computed perfect RTP
> timestamps
>
>Previously the rtptimes were a mix of media clock hz and ns,
>now all terms used to compute rtptime is expressed in hz.
>
>Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719383
>---
> gst-libs/gst/rtp/gstrtpbasepayload.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
>diff --git a/gst-libs/gst/rtp/gstrtpbasepayload.c b/gst-libs/gst/rtp/gstrtpbasepayload.c
>index a824a78..7587f4c 100644
>--- a/gst-libs/gst/rtp/gstrtpbasepayload.c
>+++ b/gst-libs/gst/rtp/gstrtpbasepayload.c
>@@ -834,11 +834,19 @@ gst_rtp_base_payload_prepare_push (GstRTPBasePayload * payload,
> /* convert to RTP time */
> if (priv->perfect_rtptime && data.offset != GST_BUFFER_OFFSET_NONE &&
> priv->base_offset != GST_BUFFER_OFFSET_NONE) {
>+ guint64 rtime_ns;
>+ guint64 rtime_hz;
>+
> /* if we have an offset, use that for making an RTP timestamp */
>- data.rtptime = payload->ts_base + priv->base_rtime +
>- data.offset - priv->base_offset;
> GST_LOG_OBJECT (payload,
> "Using offset %" G_GUINT64_FORMAT " for RTP timestamp", data.offset);
>+ rtime_ns = data.offset - priv->base_offset;
This is not nanoseconds, this is elapsed number of samples for audio.
>+ rtime_hz =
>+ gst_util_uint64_scale_int (rtime_ns, payload->clock_rate, GST_SECOND);
This is then wrong.
Are you trynig to use perfect timestamps for video?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list