From: Lawrence Troup Date: Mon, 11 Feb 2019 02:21:21 +0000 (+1300) Subject: pad: Document that pad unlink function is called with pad lock held X-Git-Tag: 1.16.2~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=227633662178cfd3ea858cfb7a958933bb80f57d;p=platform%2Fupstream%2Fgstreamer.git pad: Document that pad unlink function is called with pad lock held Fixes #353 --- diff --git a/gst/gstpad.c b/gst/gstpad.c index 473c2a3..12eb561 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -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, diff --git a/gst/gstpad.h b/gst/gstpad.h index 079eac3..848933d 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -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);