meta: 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-08 00:46:42 +00:00 committed by GStreamer Marge Bot
parent 9dd70085f1
commit 755f214a52
2 changed files with 3 additions and 3 deletions

View file

@ -153,7 +153,7 @@ gst_format_register (const gchar * nick, const gchar * description)
return query;
g_mutex_lock (&mutex);
format = g_slice_new (GstFormatDefinition);
format = g_new (GstFormatDefinition, 1);
format->value = (GstFormat) _n_values;
format->nick = g_strdup (nick);
format->description = g_strdup (description);

View file

@ -78,7 +78,7 @@ typedef struct
static void
free_info (gpointer data)
{
g_slice_free (GstMetaInfoImpl, data);
g_free (data);
}
void
@ -394,7 +394,7 @@ gst_meta_register (GType api, const gchar * impl, gsize size,
if (type == G_TYPE_INVALID)
return NULL;
info = (GstMetaInfo *) g_slice_new (GstMetaInfoImpl);
info = (GstMetaInfo *) g_new (GstMetaInfoImpl, 1);
info->api = api;
info->type = type;
info->size = size;