From: <wt...@ke...> - 2009-03-26 20:39:11
|
Module: gstreamer Branch: master Commit: e15cf9bc12eb0065e19c331de3d6013465449425 URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e15cf9bc12eb0065e19c331de3d6013465449425 Author: Wim Taymans <wim...@co...> Date: Thu Mar 26 21:40:20 2009 +0100 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. --- gst/gstsystemclock.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gst/gstsystemclock.c b/gst/gstsystemclock.c index 0ba911b..003f7a3 100644 --- a/gst/gstsystemclock.c +++ b/gst/gstsystemclock.c @@ -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, |