bus, poll: 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-07 19:42:29 +00:00 committed by GStreamer Marge Bot
parent 5a2d643f9b
commit 7d58554f4c
2 changed files with 5 additions and 5 deletions

View file

@ -1149,7 +1149,7 @@ poll_destroy (GstBusPollData * poll_data, gpointer unused)
poll_data->source_running = FALSE;
if (!poll_data->timeout_id) {
g_main_loop_unref (poll_data->loop);
g_slice_free (GstBusPollData, poll_data);
g_free (poll_data);
}
}
@ -1159,7 +1159,7 @@ poll_destroy_timeout (GstBusPollData * poll_data)
poll_data->timeout_id = 0;
if (!poll_data->source_running) {
g_main_loop_unref (poll_data->loop);
g_slice_free (GstBusPollData, poll_data);
g_free (poll_data);
}
}
@ -1217,7 +1217,7 @@ gst_bus_poll (GstBus * bus, GstMessageType events, GstClockTime timeout)
g_return_val_if_fail (GST_IS_BUS (bus), NULL);
poll_data = g_slice_new (GstBusPollData);
poll_data = g_new (GstBusPollData, 1);
poll_data->source_running = TRUE;
poll_data->loop = g_main_loop_new (NULL, FALSE);
poll_data->events = events;

View file

@ -677,7 +677,7 @@ gst_poll_new (gboolean controllable)
{
GstPoll *nset;
nset = g_slice_new0 (GstPoll);
nset = g_new0 (GstPoll, 1);
GST_DEBUG ("%p: new controllable : %d", nset, controllable);
g_mutex_init (&nset->lock);
#ifndef G_OS_WIN32
@ -794,7 +794,7 @@ gst_poll_free (GstPoll * set)
g_array_free (set->active_fds, TRUE);
g_array_free (set->fds, TRUE);
g_mutex_clear (&set->lock);
g_slice_free (GstPoll, set);
g_free (set);
}
/**