From 756a8986d02a87fd7789f8f2c9d863e72231e011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 8 Jan 2023 17:40:11 +0000 Subject: [PATCH] good: tests: drop use of GSlice Part-of: --- .../gst-plugins-good/tests/check/elements/rtpcollision.c | 8 ++++---- .../tests/examples/rpicamsrc/webrtc-unidirectional-h264.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/subprojects/gst-plugins-good/tests/check/elements/rtpcollision.c b/subprojects/gst-plugins-good/tests/check/elements/rtpcollision.c index dca5a6b551..145aab0fbb 100644 --- a/subprojects/gst-plugins-good/tests/check/elements/rtpcollision.c +++ b/subprojects/gst-plugins-good/tests/check/elements/rtpcollision.c @@ -95,15 +95,15 @@ create_rtcp_app (guint32 ssrc, guint count) /* need to begin with rr */ gst_rtcp_buffer_map (rtcp_buffer, GST_MAP_READWRITE, &rtcp); - rtcp_packet = g_slice_new0 (GstRTCPPacket); + rtcp_packet = g_new0 (GstRTCPPacket, 1); gst_rtcp_buffer_add_packet (&rtcp, GST_RTCP_TYPE_RR, rtcp_packet); gst_rtcp_packet_rr_set_ssrc (rtcp_packet, ssrc); - g_slice_free (GstRTCPPacket, rtcp_packet); + g_free (rtcp_packet); /* useful to make the rtcp buffer valid */ - rtcp_packet = g_slice_new0 (GstRTCPPacket); + rtcp_packet = g_new0 (GstRTCPPacket, 1); gst_rtcp_buffer_add_packet (&rtcp, GST_RTCP_TYPE_APP, rtcp_packet); - g_slice_free (GstRTCPPacket, rtcp_packet); + g_free (rtcp_packet); gst_rtcp_buffer_unmap (&rtcp); return rtcp_buffer; diff --git a/subprojects/gst-plugins-good/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c b/subprojects/gst-plugins-good/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c index 6944ece079..03a836e574 100644 --- a/subprojects/gst-plugins-good/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c +++ b/subprojects/gst-plugins-good/tests/examples/rpicamsrc/webrtc-unidirectional-h264.c @@ -175,7 +175,7 @@ create_receiver_entry (SoupWebsocketConnection * connection) GError *error; ReceiverEntry *receiver_entry; - receiver_entry = g_slice_alloc0 (sizeof (ReceiverEntry)); + receiver_entry = g_new0 (ReceiverEntry, 1); receiver_entry->connection = connection; g_object_ref (G_OBJECT (connection)); @@ -234,7 +234,7 @@ destroy_receiver_entry (gpointer receiver_entry_ptr) if (receiver_entry->connection != NULL) g_object_unref (G_OBJECT (receiver_entry->connection)); - g_slice_free1 (sizeof (ReceiverEntry), receiver_entry); + g_free (receiver_entry); }