From 7d1675e42e080359308d1747ef91363ec655e84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 7 Jan 2023 19:40:16 +0000 Subject: [PATCH] toc, tocsetter: drop use of GSlice Part-of: --- subprojects/gstreamer/gst/gsttoc.c | 8 ++++---- subprojects/gstreamer/gst/gsttocsetter.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/gstreamer/gst/gsttoc.c b/subprojects/gstreamer/gst/gsttoc.c index 7e8ba17be5..bee3224487 100644 --- a/subprojects/gstreamer/gst/gsttoc.c +++ b/subprojects/gstreamer/gst/gsttoc.c @@ -140,7 +140,7 @@ gst_toc_new (GstTocScope scope) g_return_val_if_fail (scope == GST_TOC_SCOPE_GLOBAL || scope == GST_TOC_SCOPE_CURRENT, NULL); - toc = g_slice_new0 (GstToc); + toc = g_new0 (GstToc, 1); gst_mini_object_init (GST_MINI_OBJECT_CAST (toc), 0, GST_TYPE_TOC, (GstMiniObjectCopyFunction) gst_toc_copy, NULL, @@ -269,7 +269,7 @@ gst_toc_entry_new_internal (GstTocEntryType type, const gchar * uid) { GstTocEntry *entry; - entry = g_slice_new0 (GstTocEntry); + entry = g_new0 (GstTocEntry, 1); gst_mini_object_init (GST_MINI_OBJECT_CAST (entry), 0, GST_TYPE_TOC_ENTRY, (GstMiniObjectCopyFunction) gst_toc_entry_copy, NULL, @@ -313,7 +313,7 @@ gst_toc_free (GstToc * toc) memset (toc, 0xff, sizeof (GstToc)); #endif - g_slice_free (GstToc, toc); + g_free (toc); } static void @@ -333,7 +333,7 @@ gst_toc_entry_free (GstTocEntry * entry) memset (entry, 0xff, sizeof (GstTocEntry)); #endif - g_slice_free (GstTocEntry, entry); + g_free (entry); } static GstTocEntry * diff --git a/subprojects/gstreamer/gst/gsttocsetter.c b/subprojects/gstreamer/gst/gsttocsetter.c index c746f23f0d..5be2a0ba27 100644 --- a/subprojects/gstreamer/gst/gsttocsetter.c +++ b/subprojects/gstreamer/gst/gsttocsetter.c @@ -78,7 +78,7 @@ gst_toc_data_free (gpointer p) g_mutex_clear (&data->lock); - g_slice_free (GstTocData, data); + g_free (data); } static GstTocData * @@ -94,7 +94,7 @@ gst_toc_setter_get_data (GstTocSetter * setter) g_mutex_lock (&create_mutex); data = g_object_get_qdata (G_OBJECT (setter), gst_toc_key); if (!data) { - data = g_slice_new (GstTocData); + data = g_new (GstTocData, 1); g_mutex_init (&data->lock); data->toc = NULL; g_object_set_qdata_full (G_OBJECT (setter), gst_toc_key, data,