mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 01:32:42 +00:00
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
This commit is contained in:
parent
bb07550c2d
commit
fdeddb4b93
1 changed files with 19 additions and 0 deletions
|
@ -481,6 +481,25 @@ gst_tag_list_unref (GstTagList * taglist)
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (taglist));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (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:
|
* gst_tag_list_copy:
|
||||||
* @taglist: a #GstTagList.
|
* @taglist: a #GstTagList.
|
||||||
|
|
Loading…
Reference in a new issue