From: Niels De Graef Date: Sun, 4 Nov 2018 17:55:42 +0000 (+0100) Subject: taglist: add gst_clear_tag_list() X-Git-Tag: 1.16.2~219 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdeddb4b934c5d42399528bbc68c1cea1d2645c9;p=platform%2Fupstream%2Fgstreamer.git taglist: add gst_clear_tag_list() Basically, you can use this instead of using gst_tag_list_unref (which needs to be preceded by a NULL-check). Also fixes #275 --- diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 0466183..cae4978 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -482,6 +482,25 @@ gst_tag_list_unref (GstTagList * taglist) } /** + * gst_clear_tag_list: (skip) + * @taglist_ptr: a pointer to a #GstTagList reference + * + * Clears a reference to a #GstTagList. + * + * @taglist_ptr must not be %NULL. + * + * If the reference is %NULL then this function does nothing. Otherwise, the + * reference count of the taglist is decreased and the pointer is set to %NULL. + * + * Since: 1.16 + */ +static inline void +gst_clear_tag_list (GstTagList ** taglist_ptr) +{ + gst_clear_mini_object (taglist_ptr); +} + +/** * gst_tag_list_copy: * @taglist: a #GstTagList. *