element: Add note about racyness to gst_element_set_locked_state()
authorSebastian Dröge <sebastian@centricular.com>
Mon, 7 Jan 2019 12:08:25 +0000 (14:08 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 9 Jan 2019 14:12:26 +0000 (16:12 +0200)
This is racy if the state lock of the parent bin is not taken. The
parent bin might've just checked the flag in another thread and as the
next step proceed to change the child element's state.

gst/gstelement.c

index 4078fa7..e186a09 100644 (file)
@@ -2241,6 +2241,10 @@ gst_element_is_locked_state (GstElement * element)
  * Locks the state of an element, so state changes of the parent don't affect
  * this element anymore.
  *
+ * Note that this is racy if the state lock of the parent bin is not taken.
+ * The parent bin might've just checked the flag in another thread and as the
+ * next step proceed to change the child element's state.
+ *
  * MT safe.
  *
  * Returns: %TRUE if the state was changed, %FALSE if bad parameters were given