Commit e15cf9bc authored by Wim Taymans's avatar Wim Taymans Committed by Wim Taymans
Browse files

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.
parent 7be99f05
......@@ -387,6 +387,14 @@ gst_system_clock_async_thread (GstClock * clock)
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 */
entry = clock->entries->data;
/* 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;
/* 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 */
res =
gst_system_clock_id_wait_jitter_unlocked (clock, (GstClockID) entry,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment