mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-04 13:45:52 +00:00
event: add gst_clear_event()
Basically, you can use this instead of using gst_event_unref (which needs to be preceded by a NULL-check). Also fixes #275
This commit is contained in:
parent
a0fd447abe
commit
efbfa54a4a
|
@ -450,6 +450,25 @@ gst_event_unref (GstEvent * event)
|
|||
gst_mini_object_unref (GST_MINI_OBJECT_CAST (event));
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_clear_event: (skip)
|
||||
* @event_ptr: a pointer to a #GstEvent reference
|
||||
*
|
||||
* Clears a reference to a #GstEvent.
|
||||
*
|
||||
* @event_ptr must not be %NULL.
|
||||
*
|
||||
* If the reference is %NULL then this function does nothing. Otherwise, the
|
||||
* reference count of the event is decreased and the pointer is set to %NULL.
|
||||
*
|
||||
* Since: 1.16
|
||||
*/
|
||||
static inline void
|
||||
gst_clear_event (GstEvent ** event_ptr)
|
||||
{
|
||||
gst_clear_mini_object (event_ptr);
|
||||
}
|
||||
|
||||
/* copy event */
|
||||
/**
|
||||
* gst_event_copy:
|
||||
|
|
Loading…
Reference in a new issue