GNOME Bugzilla – Bug 357617
[libs] gst_controller_set_from_list can return without unlocking the mutex
Last modified: 2006-09-29 12:32:59 UTC
Attaching a simple fix.
Created attachment 73374 [details] [review] Simple fix.
Forgot to mention: Patch applies with offsets since I diff'd against a fixed gstcontroller.c using patch from #357432.
Thanks for the patch! Went with a slightly different solution though :) 2006-09-29 Tim-Philipp Müller <tim at centricular dot net> * tests/check/libs/controller.c: (GST_START_TEST), (gst_controller_suite): Add test for the previous fix; add some more tests for correct refcounting behaviour; fix a few leaks in test cases; call gst_controller_init() at start of all tests. 2006-09-29 Tim-Philipp Müller <tim at centricular dot net> * libs/gst/controller/gstcontroller.c: (gst_controller_new_valist), (gst_controller_set_from_list): Don't g_return_val_if_fail() on timed values with invalid timestamps inside a critical section without unlocking the mutex. Spotted by René Stadler. (#357617) Also, fix up refcounting properly: when returning an existing controller, we should increase the reference only once and not once per property and when trying to control a property again we should also increase the refcount.