pad: Document that pad unlink function is called with pad lock held
authorLawrence Troup <lawrence.troup@teknique.com>
Mon, 11 Feb 2019 02:21:21 +0000 (15:21 +1300)
committerSebastian Dröge <slomo@coaxion.net>
Wed, 13 Feb 2019 11:56:15 +0000 (11:56 +0000)
Fixes #353

gst/gstpad.c
gst/gstpad.h

index 473c2a3..12eb561 100644 (file)
@@ -2082,6 +2082,10 @@ gst_pad_set_link_function_full (GstPad * pad, GstPadLinkFunction link,
  *
  * Sets the given unlink function for the pad. It will be called
  * when the pad is unlinked.
+ *
+ * Note that the pad's lock is already held when the unlink
+ * function is called, so most pad functions cannot be called
+ * from within the callback.
  */
 void
 gst_pad_set_unlink_function_full (GstPad * pad, GstPadUnlinkFunction unlink,
index 079eac3..848933d 100644 (file)
@@ -452,6 +452,9 @@ typedef GstPadLinkReturn    (*GstPadLinkFunction)           (GstPad *pad, GstObject *parent,
  *          during the execution of this function.
  *
  * Function signature to handle a unlinking the pad prom its peer.
+ *
+ * The pad's lock is already held when the unlink function is called, so most
+ * pad functions cannot be called from within the callback.
  */
 typedef void                   (*GstPadUnlinkFunction)         (GstPad *pad, GstObject *parent);