From 5fc782b8938a84d4f28259d38ccd16be41356320 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Tue, 11 Apr 2023 20:45:18 +0200 Subject: [PATCH] pipewireclock: Disable clock_reset() for now This was introduced in 4faa28fd96 in order to correctly map the time from the stream. From d52df30c881d on, however, the clock switched to monotonic time, which does not need the extra-offset. Disable `clock_reset()` for now but leave it in place so we can easily reenable it once we use the stream time again. This fixes video recording in Cheese and similar apps. Closes https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3149 --- src/gst/gstpipewireclock.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gst/gstpipewireclock.c b/src/gst/gstpipewireclock.c index 343dabdb0..0b024a651 100644 --- a/src/gst/gstpipewireclock.c +++ b/src/gst/gstpipewireclock.c @@ -91,6 +91,7 @@ gst_pipewire_clock_init (GstPipeWireClock * clock) void gst_pipewire_clock_reset (GstPipeWireClock * clock, GstClockTime time) { +#if 0 GstClockTimeDiff time_offset; if (clock->last_time >= time) @@ -104,4 +105,5 @@ gst_pipewire_clock_reset (GstPipeWireClock * clock, GstClockTime time) "reset clock to %" GST_TIME_FORMAT ", last %" GST_TIME_FORMAT ", offset %" GST_STIME_FORMAT, GST_TIME_ARGS (time), GST_TIME_ARGS (clock->last_time), GST_STIME_ARGS (time_offset)); +#endif }