After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 382592 - Multiple wait()ers break periodic clock ids
Multiple wait()ers break periodic clock ids
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.12
Assigned To: Wim Taymans
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-05 13:23 UTC by René Stadler
Modified: 2006-12-17 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test suite addition (2.56 KB, patch)
2006-12-05 13:25 UTC, René Stadler
committed Details | Review
Fix multiple wait()s for periodic clock ids (1.36 KB, patch)
2006-12-05 13:26 UTC, René Stadler
committed Details | Review

Description René Stadler 2006-12-05 13:23:41 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.
Comment 1 René Stadler 2006-12-05 13:25:11 UTC
Created attachment 77726 [details] [review]
Test suite addition
Comment 2 René Stadler 2006-12-05 13:26:50 UTC
Created attachment 77727 [details] [review]
Fix multiple wait()s for periodic clock ids
Comment 3 Jan Schmidt 2006-12-06 13:42:54 UTC
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
Comment 4 Wim Taymans 2006-12-07 10:52:54 UTC
        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.