mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
bufferlist: add gst_clear_buffer_list()
Basically, you can use this instead of using gst_buffer_list_unref (which needs to be preceded by a NULL-check). Also fixes #275
This commit is contained in:
parent
1068d9e2c8
commit
fa1d7a86af
1 changed files with 19 additions and 0 deletions
|
@ -93,6 +93,25 @@ gst_buffer_list_unref (GstBufferList * list)
|
|||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (list));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_clear_buffer_list: (skip)
|
||||
* @list_ptr: a pointer to a #GstBufferList reference
|
||||
*
|
||||
* Clears a reference to a #GstBufferList.
|
||||
*
|
||||
* @list_ptr must not be %NULL.
|
||||
*
|
||||
* If the reference is %NULL then this function does nothing. Otherwise, the
|
||||
* reference count of the list is decreased and the pointer is set to %NULL.
|
||||
*
|
||||
* Since: 1.16
|
||||
*/
|
||||
static inline void
|
||||
gst_clear_buffer_list (GstBufferList ** list_ptr)
|
||||
{
|
||||
gst_clear_mini_object (list_ptr);
|
||||
}
|
||||
|
||||
/* copy */
|
||||
/**
|
||||
* gst_buffer_list_copy:
|
||||
|
|
Loading…
Reference in a new issue