From: Luis de Bethencourt Date: Tue, 3 Nov 2015 14:26:29 +0000 (+0000) Subject: rtpmanager: use GST_STIME_ARGS for GstClockTimeDiff X-Git-Tag: 1.10.4~790 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4f094f5872650a2b4e6c8c8238f5961f2d0697e;p=platform%2Fupstream%2Fgst-plugins-good.git rtpmanager: use GST_STIME_ARGS for GstClockTimeDiff No need to manually handle negative values of diff, GST_STIME_ARGS does exactly this. --- diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index f1ecc30..06c869d 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -1484,17 +1484,15 @@ rtp_source_get_new_sr (RTPSource * src, guint64 ntpnstime, * We need to apply this diff to the RTP timestamp to get the RTP timestamp * for the given ntpnstime. */ diff = GST_CLOCK_DIFF (src->last_rtime, running_time); + GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff %" GST_STIME_FORMAT, + GST_TIME_ARGS (running_time), GST_STIME_ARGS (diff)); /* now translate the diff to RTP time, handle positive and negative cases. * If there is no diff, we already set rtptime correctly above. */ if (diff > 0) { - GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff %" GST_TIME_FORMAT, - GST_TIME_ARGS (running_time), GST_TIME_ARGS (diff)); t_rtp += gst_util_uint64_scale_int (diff, src->clock_rate, GST_SECOND); } else { diff = -diff; - GST_DEBUG ("running_time %" GST_TIME_FORMAT ", diff -%" GST_TIME_FORMAT, - GST_TIME_ARGS (running_time), GST_TIME_ARGS (diff)); t_rtp -= gst_util_uint64_scale_int (diff, src->clock_rate, GST_SECOND); } } else {