player: Add g_autoptr() support
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 5 Aug 2020 10:31:53 +0000 (12:31 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>
Wed, 5 Aug 2020 10:31:53 +0000 (12:31 +0200)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1495>

gst-libs/gst/player/gstplayer.h

index d5737ca..e853ed8 100644 (file)
@@ -104,6 +104,9 @@ const gchar *gst_player_color_balance_type_get_name   (GstPlayerColorBalanceType
 #define GST_PLAYER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAYER, GstPlayerClass))
 #define GST_PLAYER_CAST(obj)        ((GstPlayer*)(obj))
 
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayer, gst_object_unref)
+#endif
 
 GST_PLAYER_API
 GType        gst_player_get_type                      (void);