mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
systemclock: Update monotonic reference time when re-scheduling
There is no guarantee that the clock is currently advancing, therefore if we re-schedule (because of timeouts) a clock wait, we need to re-acquire the current monotonic clock value against which we will wait. Avoids spinning the cpu like mad (due to constant timeout) when clocks are PAUSED. Fixes #673 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/794>
This commit is contained in:
parent
daf4e5b410
commit
93e6261db7
1 changed files with 1 additions and 0 deletions
|
@ -1004,6 +1004,7 @@ gst_system_clock_id_wait_jitter_unlocked (GstClock * clock,
|
|||
|
||||
/* reschedule if gst_cond_wait_until returned early or we have to reschedule after
|
||||
* an unlock*/
|
||||
mono_ts = g_get_monotonic_time ();
|
||||
now = gst_clock_get_time (clock);
|
||||
diff = GST_CLOCK_DIFF (now, entryt);
|
||||
|
||||
|
|
Loading…
Reference in a new issue