GNOME Bugzilla – Bug 382592
Multiple wait()ers break periodic clock ids
Last modified: 2006-12-17 18:45:23 UTC
In gst_clock_id_wait and gst_system_clock_async_thread, this is executed for a periodic clock entry: entry->time += entry->interval; Obviously, this does not work as intended if there are two wait()s or a wait() and a wait_async() for the same periodic id. Attaching a test suite addition that implements the latter case as well a fix.
Created attachment 77726 [details] [review] Test suite addition
Created attachment 77727 [details] [review] Fix multiple wait()s for periodic clock ids
Thanks for the patch. I'm punting on this until after the core release, because it's not a regression. We'll apply them tomorrow or Friday after 0.10.11 core is out
Patch by: Ren�� Stadler <mail at renestadler dot de> * gst/gstclock.c: (gst_clock_id_wait): Make period ids add the interval to the origial requested time instead of the possibly updated time which can be wrong when there are multiple waiters for the same id. Fixes #382592. * gst/gstsystemclock.c: (gst_system_clock_async_thread), (gst_system_clock_id_wait_jitter_unlocked), (gst_system_clock_id_wait_jitter): Fix restart in the async notify thread when an async entry is added to the front of the list. Fixes #381492. * tests/check/gst/gstsystemclock.c: (store_callback), (notify_callback), (GST_START_TEST), (gst_systemclock_suite): Added test for multiple async waits. Added test for async wait order.