diff --git a/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c b/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c index 7dcad5411a..2e8c943118 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c +++ b/subprojects/gst-plugins-base/gst/playback/gstdecodebin2.c @@ -1803,7 +1803,7 @@ analyze_new_pad (GstDecodeBin * dbin, GstElement * src, GstPad * pad, capsfilter = delem->capsfilter = gst_element_factory_make ("capsfilter", NULL); } else { - delem = g_slice_new0 (GstDecodeElement); + delem = g_new0 (GstDecodeElement, 1); capsfilter = delem->element = gst_element_factory_make ("capsfilter", NULL); delem->capsfilter = NULL; @@ -1936,7 +1936,7 @@ setup_caps_delay: CHAIN_MUTEX_LOCK (chain); GST_LOG_OBJECT (dbin, "Chain %p has now %d dynamic pads", chain, g_list_length (chain->pending_pads)); - ppad = g_slice_new0 (GstPendingPad); + ppad = g_new0 (GstPendingPad, 1); ppad->pad = gst_object_ref (pad); ppad->chain = chain; ppad->event_probe_id = @@ -2403,7 +2403,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, GST_LOG_OBJECT (dbin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad)); CHAIN_MUTEX_LOCK (chain); - delem = g_slice_new0 (GstDecodeElement); + delem = g_new0 (GstDecodeElement, 1); delem->element = gst_object_ref (element); delem->capsfilter = NULL; chain->elements = g_list_prepend (chain->elements, delem); @@ -2620,7 +2620,7 @@ connect_pad (GstDecodeBin * dbin, GstElement * src, GstDecodePad * dpad, gst_element_set_state (tmp, GST_STATE_NULL); gst_object_unref (tmp); - g_slice_free (GstDecodeElement, dtmp); + g_free (dtmp); chain->elements = g_list_delete_link (chain->elements, chain->elements); } while (tmp != element); @@ -3364,7 +3364,7 @@ gst_decode_chain_unref (GstDecodeChain * chain) { if (g_atomic_int_dec_and_test (&chain->refs)) { g_mutex_clear (&chain->lock); - g_slice_free (GstDecodeChain, chain); + g_free (chain); } } @@ -3463,7 +3463,7 @@ gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide) gst_object_unref (element); l->data = NULL; - g_slice_free (GstDecodeElement, delem); + g_free (delem); } } if (!hide) { @@ -3542,7 +3542,7 @@ static GstDecodeChain * gst_decode_chain_new (GstDecodeBin * dbin, GstDecodeGroup * parent, GstPad * pad) { - GstDecodeChain *chain = g_slice_new0 (GstDecodeChain); + GstDecodeChain *chain = g_new0 (GstDecodeChain, 1); GST_DEBUG_OBJECT (dbin, "Creating new chain %p with parent group %p", chain, parent); @@ -3666,7 +3666,7 @@ gst_decode_group_free_internal (GstDecodeGroup * group, gboolean hide) GST_DEBUG_OBJECT (group->dbin, "%s group %p", (hide ? "Hid" : "Freed"), group); if (!hide) - g_slice_free (GstDecodeGroup, group); + g_free (group); } /* gst_decode_group_free: @@ -3846,7 +3846,7 @@ decodebin_set_queue_size_full (GstDecodeBin * dbin, GstElement * multiqueue, static GstDecodeGroup * gst_decode_group_new (GstDecodeBin * dbin, GstDecodeChain * parent) { - GstDecodeGroup *group = g_slice_new0 (GstDecodeGroup); + GstDecodeGroup *group = g_new0 (GstDecodeGroup, 1); GstElement *mq; gboolean seekable; @@ -3889,7 +3889,7 @@ missing_multiqueue: gst_missing_element_message_new (GST_ELEMENT_CAST (dbin), "multiqueue")); GST_ELEMENT_ERROR (dbin, CORE, MISSING_PLUGIN, (NULL), ("no multiqueue!")); - g_slice_free (GstDecodeGroup, group); + g_free (group); return NULL; } } @@ -5231,7 +5231,7 @@ gst_pending_pad_free (GstPendingPad * ppad) if (ppad->notify_caps_id) g_signal_handler_disconnect (ppad->pad, ppad->notify_caps_id); gst_object_unref (ppad->pad); - g_slice_free (GstPendingPad, ppad); + g_free (ppad); } /***** diff --git a/subprojects/gst-plugins-base/gst/playback/gstparsebin.c b/subprojects/gst-plugins-base/gst/playback/gstparsebin.c index 9ea753b5bd..e384f9dc9c 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstparsebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gstparsebin.c @@ -1586,7 +1586,7 @@ setup_caps_delay: CHAIN_MUTEX_LOCK (chain); GST_LOG_OBJECT (parsebin, "Chain %p has now %d dynamic pads", chain, g_list_length (chain->pending_pads)); - ppad = g_slice_new0 (GstPendingPad); + ppad = g_new0 (GstPendingPad, 1); ppad->pad = gst_object_ref (pad); ppad->chain = chain; ppad->event_probe_id = @@ -2022,7 +2022,7 @@ connect_pad (GstParseBin * parsebin, GstElement * src, GstParsePad * parsepad, GST_LOG_OBJECT (parsebin, "linked on pad %s:%s", GST_DEBUG_PAD_NAME (pad)); CHAIN_MUTEX_LOCK (chain); - pelem = g_slice_new0 (GstParseElement); + pelem = g_new0 (GstParseElement, 1); pelem->element = gst_object_ref (element); pelem->capsfilter = NULL; chain->elements = g_list_prepend (chain->elements, pelem); @@ -2191,7 +2191,7 @@ connect_pad (GstParseBin * parsebin, GstElement * src, GstParsePad * parsepad, gst_element_set_state (tmp, GST_STATE_NULL); gst_object_unref (tmp); - g_slice_free (GstParseElement, dtmp); + g_free (dtmp); chain->elements = g_list_delete_link (chain->elements, chain->elements); } while (tmp != element); @@ -2771,7 +2771,7 @@ gst_parse_chain_free_internal (GstParseChain * chain, gboolean hide) gst_object_unref (element); l->data = NULL; - g_slice_free (GstParseElement, pelem); + g_free (pelem); } } if (!hide) { @@ -2830,7 +2830,7 @@ gst_parse_chain_free_internal (GstParseChain * chain, gboolean hide) if (!hide) { g_mutex_clear (&chain->lock); - g_slice_free (GstParseChain, chain); + g_free (chain); } } @@ -2859,7 +2859,7 @@ static GstParseChain * gst_parse_chain_new (GstParseBin * parsebin, GstParseGroup * parent, GstPad * pad, GstCaps * start_caps) { - GstParseChain *chain = g_slice_new0 (GstParseChain); + GstParseChain *chain = g_new0 (GstParseChain, 1); GST_DEBUG_OBJECT (parsebin, "Creating new chain %p with parent group %p", chain, parent); @@ -2900,7 +2900,7 @@ gst_parse_group_free_internal (GstParseGroup * group, gboolean hide) GST_DEBUG_OBJECT (group->parsebin, "%s group %p", (hide ? "Hid" : "Freed"), group); if (!hide) - g_slice_free (GstParseGroup, group); + g_free (group); } /* gst_parse_group_free: @@ -3009,7 +3009,7 @@ gst_parse_chain_start_free_hidden_groups_thread (GstParseChain * chain) static GstParseGroup * gst_parse_group_new (GstParseBin * parsebin, GstParseChain * parent) { - GstParseGroup *group = g_slice_new0 (GstParseGroup); + GstParseGroup *group = g_new0 (GstParseGroup, 1); GST_DEBUG_OBJECT (parsebin, "Creating new group %p with parent chain %p", group, parent); @@ -4294,7 +4294,7 @@ gst_pending_pad_free (GstPendingPad * ppad) if (ppad->notify_caps_id) g_signal_handler_disconnect (ppad->pad, ppad->notify_caps_id); gst_object_unref (ppad->pad); - g_slice_free (GstPendingPad, ppad); + g_free (ppad); } /***** diff --git a/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c b/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c index d6aff0cc6e..310ae41a2c 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c +++ b/subprojects/gst-plugins-base/gst/playback/gstplaybin2.c @@ -3959,7 +3959,7 @@ avelements_free (gpointer avelement) gst_object_unref (elm->dec); if (elm->sink) gst_object_unref (elm->sink); - g_slice_free (GstAVElement, elm); + g_free (elm); } static gint @@ -4085,7 +4085,7 @@ avelements_create (GstPlayBin * playbin, gboolean isaudioelement) if (n_common_cf < 1) continue; - ave = g_slice_new (GstAVElement); + ave = g_new (GstAVElement, 1); ave->dec = gst_object_ref (d_factory); ave->sink = gst_object_ref (s_factory); ave->n_comm_cf = n_common_cf; @@ -4146,7 +4146,7 @@ create_decoders_list (GList * factory_list, GSequence * avelements, g_sequence_lookup (avelements, factory, (GCompareDataFunc) avelement_lookup_decoder, NULL); if (!seq_iter) { - GstAVElement *ave = g_slice_new0 (GstAVElement); + GstAVElement *ave = g_new0 (GstAVElement, 1); ave->dec = factory; ave->sink = NULL; @@ -4196,7 +4196,7 @@ create_decoders_list (GList * factory_list, GSequence * avelements, gst_plugin_feature_list_free (factory_list); for (tmp = ave_free_list; tmp; tmp = tmp->next) - g_slice_free (GstAVElement, tmp->data); + g_free (tmp->data); g_list_free (ave_free_list); dec_list = g_list_reverse (dec_list); diff --git a/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c b/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c index 46eb47852c..0c70dd9c40 100644 --- a/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gstplaybin3.c @@ -2237,7 +2237,7 @@ static void control_source_pad (GstPlayBin3 * playbin, GstPad * pad, GstPad * combine_pad, GstStreamType stream_type) { - SourcePad *sourcepad = g_slice_new0 (SourcePad); + SourcePad *sourcepad = g_new0 (SourcePad, 1); sourcepad->pad = pad; sourcepad->event_probe_id = @@ -2415,7 +2415,7 @@ release_source_pad (GstPlayBin3 * playbin, /* Remove from list of controlled pads and check again for EOS status */ playbin->source_pads = g_list_remove (playbin->source_pads, sourcepad); - g_slice_free (SourcePad, sourcepad); + g_free (sourcepad); } /* this function is called when a new pad is added to decodebin. We check the diff --git a/subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c b/subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c index 6a0f26cf43..a94817a2aa 100644 --- a/subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c +++ b/subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c @@ -105,7 +105,7 @@ gst_syncstream_unref (GstSyncStream * stream) g_return_if_fail (stream->refcount > 0); if (g_atomic_int_dec_and_test (&stream->refcount)) - g_slice_free (GstSyncStream, stream); + g_free (stream); } G_BEGIN_DECLS @@ -879,7 +879,7 @@ gst_stream_synchronizer_new_pad (GstStreamSynchronizer * sync) GstStreamSyncPad *sinkpad, *srcpad; gchar *tmp; - stream = g_slice_new0 (GstSyncStream); + stream = g_new0 (GstSyncStream, 1); stream->transform = sync; stream->stream_number = sync->current_stream_number; g_cond_init (&stream->stream_finish_cond); diff --git a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c index a128d92217..4f27d7d704 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin.c @@ -1215,7 +1215,7 @@ new_decoded_pad_added_cb (GstElement * element, GstPad * pad, g_object_set_data (G_OBJECT (pad), "uridecodebin.ghostpad", newpad); /* add event probe to monitor tags */ - stream = g_slice_alloc0 (sizeof (GstURIDecodeBinStream)); + stream = g_new0 (GstURIDecodeBinStream, 1); stream->probe_id = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, decoded_pad_event_probe, decoder, NULL); @@ -2140,7 +2140,7 @@ could_not_link: static void free_stream (gpointer value) { - g_slice_free (GstURIDecodeBinStream, value); + g_free (value); } /* remove source and all related elements */ diff --git a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c index 8f7181c493..8bbc86be6e 100644 --- a/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c +++ b/subprojects/gst-plugins-base/gst/playback/gsturidecodebin3.c @@ -675,7 +675,7 @@ add_output_pad (GstURIDecodeBin3 * dec, GstPad * target_pad) gchar *pad_name; GstEvent *stream_start; - output = g_slice_new0 (OutputPad); + output = g_new0 (OutputPad, 1); GST_LOG_OBJECT (dec, "Created output %p", output); @@ -751,7 +751,7 @@ db_pad_removed_cb (GstElement * element, GstPad * pad, GstURIDecodeBin3 * dec) /* Remove event probe */ gst_pad_remove_probe (output->target_pad, output->probe_id); - g_slice_free (OutputPad, output); + g_free (output); check_output_group_id (dec); } @@ -1321,7 +1321,7 @@ static void src_pad_added_cb (GstElement * element, GstPad * pad, GstSourceHandler * handler) { - GstSourcePad *spad = g_slice_new0 (GstSourcePad); + GstSourcePad *spad = g_new0 (GstSourcePad, 1); GstURIDecodeBin3 *uridecodebin; uridecodebin = handler->uridecodebin; @@ -1401,7 +1401,7 @@ src_pad_removed_cb (GstElement * element, GstPad * pad, gst_object_unref (spad->stream); handler->sourcepads = g_list_remove (handler->sourcepads, spad); - g_slice_free (GstSourcePad, spad); + g_free (spad); } static void @@ -1427,7 +1427,7 @@ new_source_handler (GstURIDecodeBin3 * uridecodebin, GstPlayItem * item, { GstSourceHandler *handler; - handler = g_slice_new0 (GstSourceHandler); + handler = g_new0 (GstSourceHandler, 1); handler->uridecodebin = uridecodebin; handler->play_item = item; @@ -1653,13 +1653,13 @@ free_source_handler (GstURIDecodeBin3 * uridecodebin, } if (handler->pending_buffering_msg) gst_message_unref (handler->pending_buffering_msg); - g_slice_free (GstSourceHandler, handler); + g_free (handler); } static GstSourceItem * new_source_item (GstURIDecodeBin3 * dec, GstPlayItem * item, gchar * uri) { - GstSourceItem *sourceitem = g_slice_new0 (GstSourceItem); + GstSourceItem *sourceitem = g_new0 (GstSourceItem, 1); sourceitem->play_item = item; sourceitem->uri = uri; @@ -1674,7 +1674,7 @@ free_source_item (GstURIDecodeBin3 * uridecodebin, GstSourceItem * item) if (item->handler) free_source_handler (uridecodebin, item->handler); g_free (item->uri); - g_slice_free (GstSourceItem, item); + g_free (item); } static void @@ -1691,7 +1691,7 @@ source_item_set_uri (GstSourceItem * item, const gchar * uri) static GstPlayItem * new_play_item (GstURIDecodeBin3 * dec) { - GstPlayItem *item = g_slice_new0 (GstPlayItem); + GstPlayItem *item = g_new0 (GstPlayItem, 1); item->uridecodebin = dec; item->group_id = GST_GROUP_ID_INVALID; @@ -1708,7 +1708,7 @@ free_play_item (GstURIDecodeBin3 * dec, GstPlayItem * item) if (item->sub_item) free_source_item (dec, item->sub_item); - g_slice_free (GstPlayItem, item); + g_free (item); } static void