From 52d2891fe3dea20969bfe5a5791e33d78a4c771d Mon Sep 17 00:00:00 2001 From: Umang Jain Date: Thu, 14 Dec 2017 00:03:04 +0530 Subject: [PATCH] docs: GstBus: Provide more information for ref/unref during bus watch. https://bugzilla.gnome.org/show_bug.cgi?id=791588 --- gst/gstbus.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gst/gstbus.c b/gst/gstbus.c index 6699e05..55a65cc 100644 --- a/gst/gstbus.c +++ b/gst/gstbus.c @@ -974,6 +974,9 @@ gst_bus_add_watch_full_unlocked (GstBus * bus, gint priority, * from @func. If the watch was added to the default main context it is also * possible to remove the watch using g_source_remove(). * + * The bus watch will take its own reference to the @bus, so it is safe to unref + * @bus using gst_object_unref() after setting the bus watch. + * * MT safe. * * Returns: The event source id or 0 if @bus already got an event source. @@ -1015,9 +1018,12 @@ gst_bus_add_watch_full (GstBus * bus, gint priority, * from @func. If the watch was added to the default main context it is also * possible to remove the watch using g_source_remove(). * - * Returns: The event source id or 0 if @bus already got an event source. + * The bus watch will take its own reference to the @bus, so it is safe to unref + * @bus using gst_object_unref() after setting the bus watch. * * MT safe. + * + * Returns: The event source id or 0 if @bus already got an event source. */ guint gst_bus_add_watch (GstBus * bus, GstBusFunc func, gpointer user_data) -- 2.7.4