mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
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>
This commit is contained in:
parent
bda42a7a00
commit
c899d0a52c
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue