Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gstreamer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter Willem Jordaan <pieterwjordaanpc@gmail.com>2021-03-31 22:13:45 +0300
committerPieter Willem Jordaan <pieterwjordaanpc@gmail.com>2021-03-31 22:16:36 +0300
commitc899d0a52c76972c64ef86a075314530a042ef8d (patch)
treee5d6dcaff817e126417e12e61beac38cf6a784c5
parentbda42a7a00f9c374ccaa6dcc3a43b5261dae92ef (diff)
systemclock: Fix deadlock on clock_nanosleep
Always use the monotonic clock's diff and end time for clock_nanosleep to have predictable behaviour even with other clock types. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/779>
-rw-r--r--gst/gstsystemclock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c
index 61d4d513bb..665da53cf4 100644
--- a/gst/gstsystemclock.c
+++ b/gst/gstsystemclock.c
@@ -966,7 +966,7 @@ gst_system_clock_id_wait_jitter_unlocked (GstClock * clock,
/* In order to provide more accurate wait, we will use BLOCKING
clock_nanosleep for any deadlines at or below 500us */
struct timespec end;
- GST_TIME_TO_TIMESPEC (entryt, end);
+ GST_TIME_TO_TIMESPEC (mono_ts * 1000 + diff, end);
GST_SYSTEM_CLOCK_ENTRY_UNLOCK ((GstClockEntryImpl *) entry);
waitret =
clock_nanosleep (CLOCK_MONOTONIC, TIMER_ABSTIME, &end, NULL) == 0;