mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
clock: remove pending async wakeup sooner
Remove a pending async wakeup before we check if the next entry is UNSCHEDULED because we might leave the control socket busy.
This commit is contained in:
parent
7be99f052b
commit
e15cf9bc12
1 changed files with 8 additions and 8 deletions
|
@ -387,6 +387,14 @@ gst_system_clock_async_thread (GstClock * clock)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* see if we have a pending wakeup because the order of the list
|
||||||
|
* changed. */
|
||||||
|
if (sysclock->priv->async_wakeup) {
|
||||||
|
GST_CAT_DEBUG (GST_CAT_CLOCK, "clear async wakeup");
|
||||||
|
gst_system_clock_remove_wakeup (sysclock);
|
||||||
|
sysclock->priv->async_wakeup = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* pick the next entry */
|
/* pick the next entry */
|
||||||
entry = clock->entries->data;
|
entry = clock->entries->data;
|
||||||
/* if it was unscheduled, just move on to the next entry */
|
/* if it was unscheduled, just move on to the next entry */
|
||||||
|
@ -397,14 +405,6 @@ gst_system_clock_async_thread (GstClock * clock)
|
||||||
|
|
||||||
requested = entry->time;
|
requested = entry->time;
|
||||||
|
|
||||||
/* see if we have a pending wakeup because the order of the list
|
|
||||||
* changed. */
|
|
||||||
if (sysclock->priv->async_wakeup) {
|
|
||||||
GST_CAT_DEBUG (GST_CAT_CLOCK, "clear async wakeup", entry);
|
|
||||||
gst_system_clock_remove_wakeup (sysclock);
|
|
||||||
sysclock->priv->async_wakeup = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* now wait for the entry, we already hold the lock */
|
/* now wait for the entry, we already hold the lock */
|
||||||
res =
|
res =
|
||||||
gst_system_clock_id_wait_jitter_unlocked (clock, (GstClockID) entry,
|
gst_system_clock_id_wait_jitter_unlocked (clock, (GstClockID) entry,
|
||||||
|
|
Loading…
Reference in a new issue