good: tests: 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:40:11 +00:00 committed by GStreamer Marge Bot
parent f6950b4537
commit 756a8986d0
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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);
}