diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1parser.c index 3e80380976..8e9a206f27 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstav1parser.c @@ -544,7 +544,7 @@ gst_av1_parse_reset_state (GstAV1Parser * parser, gboolean free_sps) parser->state.sequence_changed = FALSE; if (parser->seq_header) { - g_slice_free (GstAV1SequenceHeaderOBU, parser->seq_header); + g_free (parser->seq_header); parser->seq_header = NULL; } } @@ -1440,10 +1440,10 @@ gst_av1_parser_parse_sequence_header_obu (GstAV1Parser * parser, sizeof (GstAV1SequenceHeaderOBU))) goto success; - g_slice_free (GstAV1SequenceHeaderOBU, parser->seq_header); + g_free (parser->seq_header); } - parser->seq_header = g_slice_dup (GstAV1SequenceHeaderOBU, seq_header); + parser->seq_header = g_memdup2 (seq_header, sizeof (GstAV1SequenceHeaderOBU)); gst_av1_parse_reset_state (parser, FALSE); /* choose_operating_point() set the operating_point */ @@ -4664,7 +4664,7 @@ gst_av1_parser_set_operating_point (GstAV1Parser * parser, GstAV1Parser * gst_av1_parser_new (void) { - return g_slice_new0 (GstAV1Parser); + return g_new0 (GstAV1Parser, 1); } /** @@ -4683,6 +4683,6 @@ gst_av1_parser_free (GstAV1Parser * parser) g_return_if_fail (parser != NULL); if (parser->seq_header) - g_slice_free (GstAV1SequenceHeaderOBU, parser->seq_header); - g_slice_free (GstAV1Parser, parser); + g_free (parser->seq_header); + g_free (parser); } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c index 349d6d23b3..7f9000a6d5 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth264parser.c @@ -1432,7 +1432,7 @@ gst_h264_nal_parser_new (void) { GstH264NalParser *nalparser; - nalparser = g_slice_new0 (GstH264NalParser); + nalparser = g_new0 (GstH264NalParser, 1); return nalparser; } @@ -1452,7 +1452,7 @@ gst_h264_nal_parser_free (GstH264NalParser * nalparser) gst_h264_sps_clear (&nalparser->sps[i]); for (i = 0; i < GST_H264_MAX_PPS_COUNT; i++) gst_h264_pps_clear (&nalparser->pps[i]); - g_slice_free (GstH264NalParser, nalparser); + g_free (nalparser); nalparser = NULL; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c index d232ba9f97..1426b3c10a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gsth265parser.c @@ -1357,7 +1357,7 @@ gst_h265_parser_new (void) { GstH265Parser *parser; - parser = g_slice_new0 (GstH265Parser); + parser = g_new0 (GstH265Parser, 1); return parser; } @@ -1371,7 +1371,7 @@ gst_h265_parser_new (void) void gst_h265_parser_free (GstH265Parser * parser) { - g_slice_free (GstH265Parser, parser); + g_free (parser); parser = NULL; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstmpegvideometa.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstmpegvideometa.c index bce5c67d69..c0e05e842e 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstmpegvideometa.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstmpegvideometa.c @@ -47,18 +47,17 @@ gst_mpeg_video_meta_free (GstMpegVideoMeta * mpeg_video_meta, GstBuffer * buffer) { if (mpeg_video_meta->sequencehdr) - g_slice_free (GstMpegVideoSequenceHdr, mpeg_video_meta->sequencehdr); + g_free (mpeg_video_meta->sequencehdr); if (mpeg_video_meta->sequenceext) - g_slice_free (GstMpegVideoSequenceExt, mpeg_video_meta->sequenceext); + g_free (mpeg_video_meta->sequenceext); if (mpeg_video_meta->sequencedispext) - g_slice_free (GstMpegVideoSequenceDisplayExt, - mpeg_video_meta->sequencedispext); + g_free (mpeg_video_meta->sequencedispext); if (mpeg_video_meta->pichdr) - g_slice_free (GstMpegVideoPictureHdr, mpeg_video_meta->pichdr); + g_free (mpeg_video_meta->pichdr); if (mpeg_video_meta->picext) - g_slice_free (GstMpegVideoPictureExt, mpeg_video_meta->picext); + g_free (mpeg_video_meta->picext); if (mpeg_video_meta->quantext) - g_slice_free (GstMpegVideoQuantMatrixExt, mpeg_video_meta->quantext); + g_free (mpeg_video_meta->quantext); } static gboolean @@ -160,19 +159,21 @@ gst_buffer_add_mpeg_video_meta (GstBuffer * buffer, if (seq_hdr) mpeg_video_meta->sequencehdr = - g_slice_dup (GstMpegVideoSequenceHdr, seq_hdr); + g_memdup2 (seq_hdr, sizeof (GstMpegVideoSequenceHdr)); if (seq_ext) mpeg_video_meta->sequenceext = - g_slice_dup (GstMpegVideoSequenceExt, seq_ext); + g_memdup2 (seq_ext, sizeof (GstMpegVideoSequenceExt)); if (disp_ext) mpeg_video_meta->sequencedispext = - g_slice_dup (GstMpegVideoSequenceDisplayExt, disp_ext); - mpeg_video_meta->pichdr = g_slice_dup (GstMpegVideoPictureHdr, pic_hdr); + g_memdup2 (disp_ext, sizeof (GstMpegVideoSequenceDisplayExt)); + mpeg_video_meta->pichdr = + g_memdup2 (pic_hdr, sizeof (GstMpegVideoPictureHdr)); if (pic_ext) - mpeg_video_meta->picext = g_slice_dup (GstMpegVideoPictureExt, pic_ext); + mpeg_video_meta->picext = + g_memdup2 (pic_ext, sizeof (GstMpegVideoPictureExt)); if (quant_ext) mpeg_video_meta->quantext = - g_slice_dup (GstMpegVideoQuantMatrixExt, quant_ext); + g_memdup2 (quant_ext, sizeof (GstMpegVideoQuantMatrixExt)); return mpeg_video_meta; } diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvc1parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvc1parser.c index 2c60ced949..f9af175a9b 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvc1parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvc1parser.c @@ -2154,7 +2154,7 @@ failed: GstVC1BitPlanes * gst_vc1_bitplanes_new (void) { - return g_slice_new0 (GstVC1BitPlanes); + return g_new0 (GstVC1BitPlanes, 1); } /** @@ -2167,7 +2167,7 @@ void gst_vc1_bitplanes_free (GstVC1BitPlanes * bitplanes) { gst_vc1_bitplanes_free_1 (bitplanes); - g_slice_free (GstVC1BitPlanes, bitplanes); + g_free (bitplanes); } /** diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c index cb82a0816f..1452210457 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecparsers/gstvp9parser.c @@ -637,11 +637,11 @@ gst_vp9_parser_new (void) INITIALIZE_DEBUG_CATEGORY; GST_DEBUG ("Create VP9 Parser"); - parser = g_slice_new0 (GstVp9Parser); + parser = g_new0 (GstVp9Parser, 1); if (!parser) return NULL; - priv = g_slice_new0 (GstVp9ParserPrivate); + priv = g_new0 (GstVp9ParserPrivate, 1); if (!priv) return NULL; @@ -664,10 +664,10 @@ gst_vp9_parser_free (GstVp9Parser * parser) { if (parser) { if (parser->priv) { - g_slice_free (GstVp9ParserPrivate, parser->priv); + g_free (parser->priv); parser->priv = NULL; } - g_slice_free (GstVp9Parser, parser); + g_free (parser); } }