diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.com> | 2021-03-11 17:41:16 +0300 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2021-03-11 20:48:40 +0300 |
commit | 570030870122fc4e90d1f6e12f9e5432c55d4f1c (patch) | |
tree | 069b75be5afd800b08f0e52a11232125855e8c0b | |
parent | f90e9a71ddd0015a250400ef35bbed3dd5cda1a8 (diff) |
clock: define AUTO_CLEANUP_FREE_FUNC for GstClockID
GstClockID is secretly a gpointer so we can't use g_autoptr(),
instead user can do:
g_auto (GstClockID) clock_id = 0;
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/770>
-rw-r--r-- | gst/gstclock.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/gstclock.h b/gst/gstclock.h index b9bd230ffa..1c17e9f332 100644 --- a/gst/gstclock.h +++ b/gst/gstclock.h @@ -642,6 +642,7 @@ gboolean gst_clock_periodic_id_reinit (GstClock * clock, GstClockTime interval); G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstClock, gst_object_unref) +G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GstClockID, gst_clock_id_unref, 0) G_END_DECLS |