multifile: 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 17:31:29 +00:00 committed by GStreamer Marge Bot
parent e256472ca6
commit 56d3beed0b
3 changed files with 11 additions and 11 deletions

View file

@ -203,7 +203,7 @@ static void
splitmux_part_free_queue_item (GstDataQueueItem * item)
{
gst_mini_object_unref (item->object);
g_slice_free (GstDataQueueItem, item);
g_free (item);
}
static GstFlowReturn
@ -251,7 +251,7 @@ splitmux_part_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
/* We are active, and one queue is empty, place this buffer in
* the dataqueue */
GST_LOG_OBJECT (reader, "Enqueueing buffer %" GST_PTR_FORMAT, buf);
item = g_slice_new (GstDataQueueItem);
item = g_new (GstDataQueueItem, 1);
item->destroy = (GDestroyNotify) splitmux_part_free_queue_item;
item->object = GST_MINI_OBJECT (buf);
item->size = gst_buffer_get_size (buf);
@ -341,7 +341,7 @@ enqueue_event (GstSplitMuxPartReader * reader, GstSplitMuxPartPad * part_pad,
GstDataQueueItem *item;
GST_LOG_OBJECT (reader, "Enqueueing event %" GST_PTR_FORMAT, event);
item = g_slice_new (GstDataQueueItem);
item = g_new (GstDataQueueItem, 1);
item->destroy = (GDestroyNotify) splitmux_part_free_queue_item;
item->object = GST_MINI_OBJECT (event);
item->size = 0;

View file

@ -252,32 +252,32 @@ static GstClockTime calculate_next_max_timecode (GstSplitMuxSink * splitmux,
static MqStreamBuf *
mq_stream_buf_new (void)
{
return g_slice_new0 (MqStreamBuf);
return g_new0 (MqStreamBuf, 1);
}
static void
mq_stream_buf_free (MqStreamBuf * data)
{
g_slice_free (MqStreamBuf, data);
g_free (data);
}
static SplitMuxOutputCommand *
out_cmd_buf_new (void)
{
return g_slice_new0 (SplitMuxOutputCommand);
return g_new0 (SplitMuxOutputCommand, 1);
}
static void
out_cmd_buf_free (SplitMuxOutputCommand * data)
{
g_slice_free (SplitMuxOutputCommand, data);
g_free (data);
}
static void
input_gop_free (InputGop * gop)
{
g_clear_pointer (&gop->start_tc, gst_video_time_code_free);
g_slice_free (InputGop, gop);
g_free (gop);
}
static void
@ -2878,7 +2878,7 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
splitmux->fragment_start_time_pts = rtime;
if (g_queue_is_empty (&splitmux->pending_input_gops)) {
InputGop *gop = g_slice_new0 (InputGop);
InputGop *gop = g_new0 (InputGop, 1);
gop->from_gap = TRUE;
gop->start_time = rtime;
@ -3026,7 +3026,7 @@ handle_mq_input (GstPad * pad, GstPadProbeInfo * info, MqStreamCtx * ctx)
if (!gop || (!gop->from_gap
&& !GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT))) {
gop = g_slice_new0 (InputGop);
gop = g_new0 (InputGop, 1);
gop->start_time = running_time;
gop->start_time_pts = running_time_pts;

View file

@ -810,7 +810,7 @@ gst_splitmux_pad_loop (GstPad * pad)
}
}
}
g_slice_free (GstDataQueueItem, item);
g_free (item);
gst_object_unref (reader);
gst_object_unref (part_pad);