From c095a1d62061f2fc71527c9f8e28c86176d1cc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 8 Jan 2023 18:08:05 +0000 Subject: [PATCH] srtp: drop use of GSlice Part-of: --- subprojects/gst-plugins-bad/ext/srtp/gstsrtp.c | 4 ++-- subprojects/gst-plugins-bad/ext/srtp/gstsrtpdec.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/srtp/gstsrtp.c b/subprojects/gst-plugins-bad/ext/srtp/gstsrtp.c index 5a34945481..d1c95aec35 100644 --- a/subprojects/gst-plugins-bad/ext/srtp/gstsrtp.c +++ b/subprojects/gst-plugins-bad/ext/srtp/gstsrtp.c @@ -73,7 +73,7 @@ struct GstSrtpEventReporterData static void free_reporter_data (gpointer data) { - g_slice_free (struct GstSrtpEventReporterData, data); + g_free (data); } @@ -101,7 +101,7 @@ gst_srtp_init_event_reporter (void) struct GstSrtpEventReporterData *dat = g_private_get (¤t_callback); if (!dat) { - dat = g_slice_new (struct GstSrtpEventReporterData); + dat = g_new (struct GstSrtpEventReporterData, 1); g_private_set (¤t_callback, dat); } diff --git a/subprojects/gst-plugins-bad/ext/srtp/gstsrtpdec.c b/subprojects/gst-plugins-bad/ext/srtp/gstsrtpdec.c index 2467f1b979..4d03feb90c 100644 --- a/subprojects/gst-plugins-bad/ext/srtp/gstsrtpdec.c +++ b/subprojects/gst-plugins-bad/ext/srtp/gstsrtpdec.c @@ -561,7 +561,7 @@ get_stream_from_caps (GstSrtpDec * filter, GstCaps * caps, guint32 ssrc) const gchar *rtp_cipher, *rtp_auth, *rtcp_cipher, *rtcp_auth; /* Create new stream structure and set default values */ - stream = g_slice_new0 (GstSrtpDecSsrcStream); + stream = g_new0 (GstSrtpDecSsrcStream, 1); stream->ssrc = ssrc; stream->key = NULL; @@ -671,7 +671,7 @@ get_stream_from_caps (GstSrtpDec * filter, GstCaps * caps, guint32 ssrc) return stream; error: - g_slice_free (GstSrtpDecSsrcStream, stream); + g_free (stream); return NULL; } @@ -848,7 +848,7 @@ free_stream (GstSrtpDecSsrcStream * stream) gst_buffer_unref (stream->key); if (stream->keys) g_array_free (stream->keys, TRUE); - g_slice_free (GstSrtpDecSsrcStream, stream); + g_free (stream); } static gboolean @@ -949,7 +949,7 @@ update_session_stream_from_caps (GstSrtpDec * filter, guint32 ssrc, GST_WARNING_OBJECT (filter, "Failed to create the stream (err: %d)", err); if (stream->key) gst_buffer_unref (stream->key); - g_slice_free (GstSrtpDecSsrcStream, stream); + g_free (stream); stream = NULL; } }