mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
query: add gst_clear_query()
Basically, you can use this instead of using gst_query_unref (which needs to be preceded by a NULL-check). Also fixes #275
This commit is contained in:
parent
24f1fb252a
commit
bb07550c2d
1 changed files with 19 additions and 0 deletions
|
@ -254,6 +254,25 @@ gst_query_unref (GstQuery * q)
|
||||||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
|
gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_clear_query: (skip)
|
||||||
|
* @query_ptr: a pointer to a #GstQuery reference
|
||||||
|
*
|
||||||
|
* Clears a reference to a #GstQuery.
|
||||||
|
*
|
||||||
|
* @query_ptr must not be %NULL.
|
||||||
|
*
|
||||||
|
* If the reference is %NULL then this function does nothing. Otherwise, the
|
||||||
|
* reference count of the query is decreased and the pointer is set to %NULL.
|
||||||
|
*
|
||||||
|
* Since: 1.16
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
gst_clear_query (GstQuery ** query_ptr)
|
||||||
|
{
|
||||||
|
gst_clear_mini_object (query_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
/* copy query */
|
/* copy query */
|
||||||
/**
|
/**
|
||||||
* gst_query_copy:
|
* gst_query_copy:
|
||||||
|
|
Loading…
Reference in a new issue