From 72402cc649cf42886931d136cb900e9078000d93 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 8 Jan 2013 16:27:42 +0100 Subject: [PATCH] rtp: small improvements --- gst/rtpmanager/gstrtpsession.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 1e0e0ee..88e76a6 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -783,10 +783,12 @@ get_current_times (GstRtpSession * rtpsession, GstClockTime * running_time, gst_object_ref (clock); GST_OBJECT_UNLOCK (rtpsession); + /* get current clock time and convert to running time */ clock_time = gst_clock_get_time (clock); + rt = clock_time - base_time; if (rtpsession->priv->use_pipeline_clock) { - ntpns = clock_time - base_time; + ntpns = rt; } else { GTimeVal current; @@ -798,9 +800,6 @@ get_current_times (GstRtpSession * rtpsession, GstClockTime * running_time, /* add constant to convert from 1970 based time to 1900 based time */ ntpns += (2208988800LL * GST_SECOND); - /* get current clock time and convert to running time */ - rt = clock_time - base_time; - gst_object_unref (clock); } else { GST_OBJECT_UNLOCK (rtpsession); -- 2.7.4