From 26fa35a0e7e9588c1d270877996f652bc819c815 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 23 Apr 2020 12:38:05 +0200 Subject: [PATCH] gst: always use the clock time Also use the clock time when the stream is not yet started. --- src/gst/gstpipewireclock.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gst/gstpipewireclock.c b/src/gst/gstpipewireclock.c index 91210dfa6..634b6e398 100644 --- a/src/gst/gstpipewireclock.c +++ b/src/gst/gstpipewireclock.c @@ -53,16 +53,16 @@ gst_pipewire_clock_get_internal_time (GstClock * clock) { GstPipeWireClock *pclock = (GstPipeWireClock *) clock; GstClockTime result; - struct pw_time t; struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); +#if 0 + struct pw_time t; if (pclock->stream == NULL || pw_stream_get_time (pclock->stream, &t) < 0 || t.rate.denom == 0) return pclock->last_time; - clock_gettime(CLOCK_MONOTONIC, &ts); -#if 0 result = gst_util_uint64_scale_int (t.ticks, GST_SECOND * t.rate.num, t.rate.denom); result += SPA_TIMESPEC_TO_NSEC(&ts) - t.now;