taglist, tagsetter: drop use of GSlice

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
Tim-Philipp Müller 2023-01-07 19:40:42 +00:00 committed by GStreamer Marge Bot
parent 7d1675e42e
commit aef5456140
2 changed files with 5 additions and 5 deletions

View file

@ -549,7 +549,7 @@ gst_tag_register_static (const gchar * name, GstTagFlag flag, GType type,
return;
}
info = g_slice_new (GstTagInfo);
info = g_new (GstTagInfo, 1);
info->flag = flag;
info->type = type;
info->name_quark = g_quark_from_static_string (name);
@ -693,7 +693,7 @@ gst_tag_list_new_internal (GstStructure * s, GstTagScope scope)
g_assert (s != NULL);
tag_list = (GstTagList *) g_slice_new (GstTagListImpl);
tag_list = (GstTagList *) g_new (GstTagListImpl, 1);
gst_mini_object_init (GST_MINI_OBJECT_CAST (tag_list), 0, GST_TYPE_TAG_LIST,
(GstMiniObjectCopyFunction) __gst_tag_list_copy, NULL,
@ -724,7 +724,7 @@ __gst_tag_list_free (GstTagList * list)
memset (list, 0xff, sizeof (GstTagListImpl));
#endif
g_slice_free1 (sizeof (GstTagListImpl), list);
g_free (list);
}
static GstTagList *

View file

@ -108,7 +108,7 @@ gst_tag_data_free (gpointer p)
g_mutex_clear (&data->lock);
g_slice_free (GstTagData, data);
g_free (data);
}
static GstTagData *
@ -125,7 +125,7 @@ gst_tag_setter_get_data (GstTagSetter * setter)
data = g_object_get_qdata (G_OBJECT (setter), gst_tag_key);
if (!data) {
data = g_slice_new (GstTagData);
data = g_new (GstTagData, 1);
g_mutex_init (&data->lock);
data->list = NULL;
data->mode = GST_TAG_MERGE_KEEP;