systemclock: fixed race condition in handling alarms
authorFlorin Apostol <florin.apostol@oregan.net>
Mon, 18 Jan 2016 16:25:20 +0000 (16:25 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 20 Jan 2016 11:47:20 +0000 (13:47 +0200)
commitf0e94b4cdf70955dc2b002148b1636f0dc18f459
tree30d106477389ddfc695e40537bbcdec993f6091b
parent5ce5549ce06ea72989dd8fd70f9345fdfc371186
systemclock: fixed race condition in handling alarms

When choosing the first entry from the list, gst_system_clock_async_thread
must set the entry state to busy before releasing the clock lock. Otherwise
a new entry could be added to the beginning of the list and
gst_system_clock_async_thread will be unaware and keep waiting on the entry
it has already chosen.

Also improved messages about expected state and bumped them to ERROR level
to detect unexpected state changes.

https://bugzilla.gnome.org/show_bug.cgi?id=760757
gst/gstsystemclock.c