Commit 8d180557 authored by Niels De Graef's avatar Niels De Graef

uri: Add gst_clear_uri()

Basically, you can use this instead of using `gst_uri_unref()` (which
needs to be preceded by a NULL-check).

See gstreamer/gstreamer#275
and gstreamer/gstreamer!3
parent 19467a7d
......@@ -392,6 +392,25 @@ gst_uri_unref (GstUri * uri)
gst_mini_object_unref (GST_MINI_OBJECT_CAST (uri));
* gst_clear_uri: (skip)
* @uri_ptr: a pointer to a #GstUri reference
* Clears a reference to a #GstUri.
* @uri_ptr must not be %NULL.
* If the reference is %NULL then this function does nothing. Otherwise, the
* reference count of the uri is decreased and the pointer is set to %NULL.
* Since: 1.18
static inline void
gst_clear_uri (GstUri ** uri_ptr)
gst_clear_mini_object ((GstMiniObject **) uri_ptr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment