datetime: 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 00:49:00 +00:00 committed by GStreamer Marge Bot
parent 384c4f1bef
commit 15c1b9ad45

View file

@ -87,7 +87,7 @@ gst_date_time_new_from_g_date_time (GDateTime * dt)
if (!dt)
return NULL;
gst_dt = g_slice_new (GstDateTime);
gst_dt = g_new (GstDateTime, 1);
gst_mini_object_init (GST_MINI_OBJECT_CAST (gst_dt), 0, GST_TYPE_DATE_TIME,
NULL, NULL, (GstMiniObjectFreeFunction) gst_date_time_free);
@ -1047,7 +1047,7 @@ gst_date_time_free (GstDateTime * datetime)
memset (datetime, 0xff, sizeof (GstDateTime));
#endif
g_slice_free (GstDateTime, datetime);
g_free (datetime);
}
/**