diff --git a/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmux.c b/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmux.c index e2b994fd4e..24f8b593bb 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmux.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmux.c @@ -113,7 +113,7 @@ static void tsmux_section_free (TsMuxSection * section) { gst_mpegts_section_unref (section->section); - g_slice_free (TsMuxSection, section); + g_free (section); } /** @@ -128,7 +128,7 @@ tsmux_new (void) { TsMux *mux; - mux = g_slice_new0 (TsMux); + mux = g_new0 (TsMux, 1); mux->transport_id = TSMUX_DEFAULT_TS_ID; @@ -344,7 +344,7 @@ tsmux_add_mpegts_si_section (TsMux * mux, GstMpegtsSection * section) g_return_val_if_fail (section != NULL, FALSE); g_return_val_if_fail (mux->si_sections != NULL, FALSE); - tsmux_section = g_slice_new0 (TsMuxSection); + tsmux_section = g_new0 (TsMuxSection, 1); GST_DEBUG ("Adding mpegts section with type %d to mux", section->section_type); @@ -398,7 +398,7 @@ tsmux_free (TsMux * mux) /* Free SI table sections */ g_hash_table_unref (mux->si_sections); - g_slice_free (TsMux, mux); + g_free (mux); } static gint @@ -427,7 +427,7 @@ tsmux_program_new (TsMux * mux, gint prog_id) if (mux->nb_programs == TSMUX_MAX_PROGRAMS) return NULL; - program = g_slice_new0 (TsMuxProgram); + program = g_new0 (TsMuxProgram, 1); program->pmt_changed = TRUE; program->pmt_interval = TSMUX_DEFAULT_PMT_INTERVAL; @@ -576,7 +576,7 @@ tsmux_program_set_scte35_pid (TsMuxProgram * program, guint16 pid) program->scte35_null_section = NULL; } if (pid != 0) { - program->scte35_null_section = section = g_slice_new0 (TsMuxSection); + program->scte35_null_section = section = g_new0 (TsMuxSection, 1); section->pi.pid = pid; sit = gst_mpegts_scte_null_new (); section->section = gst_mpegts_section_from_scte_sit (sit, pid); @@ -1677,7 +1677,7 @@ tsmux_program_free (TsMuxProgram * program) tsmux_section_free (program->scte35_null_section); g_ptr_array_free (program->streams, TRUE); - g_slice_free (TsMuxProgram, program); + g_free (program); } /** diff --git a/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmuxstream.c b/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmuxstream.c index 04dafa0c5e..953287131c 100644 --- a/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmuxstream.c +++ b/subprojects/gst-plugins-bad/gst/mpegtsmux/tsmux/tsmuxstream.c @@ -108,7 +108,7 @@ struct TsMuxStreamBuffer TsMuxStream * tsmux_stream_new (guint16 pid, guint stream_type) { - TsMuxStream *stream = g_slice_new0 (TsMuxStream); + TsMuxStream *stream = g_new0 (TsMuxStream, 1); stream->state = TSMUX_STREAM_STATE_HEADER; stream->pi.pid = pid; @@ -259,11 +259,11 @@ tsmux_stream_free (TsMuxStream * stream) if (stream->buffer_release) stream->buffer_release (tmbuf->data, tmbuf->user_data); - g_slice_free (TsMuxStreamBuffer, tmbuf); + g_free (tmbuf); } g_list_free (stream->buffers); - g_slice_free (TsMuxStream, stream); + g_free (stream); } /** @@ -331,7 +331,7 @@ tsmux_stream_consume (TsMuxStream * stream, guint len) stream->cur_buffer->user_data); } - g_slice_free (TsMuxStreamBuffer, stream->cur_buffer); + g_free (stream->cur_buffer); stream->cur_buffer = NULL; /* FIXME: As a hack, for unbounded streams, start a new PES packet for each * incoming packet we receive. This assumes that incoming data is @@ -716,7 +716,7 @@ tsmux_stream_add_data (TsMuxStream * stream, guint8 * data, guint len, g_return_if_fail (stream != NULL); - packet = g_slice_new (TsMuxStreamBuffer); + packet = g_new (TsMuxStreamBuffer, 1); packet->data = data; packet->size = len; packet->user_data = user_data;