segment: 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:56:41 +00:00 committed by GStreamer Marge Bot
parent 19a6468a53
commit eeced74fce

View file

@ -20,6 +20,7 @@
*/
#include "gst_private.h"
#include "glib-compat-private.h"
#include <math.h>
@ -103,7 +104,7 @@ gst_segment_copy (const GstSegment * segment)
GstSegment *result = NULL;
if (segment) {
result = (GstSegment *) g_slice_copy (sizeof (GstSegment), segment);
result = (GstSegment *) g_memdup2 (segment, sizeof (GstSegment));
}
return result;
}
@ -139,7 +140,7 @@ gst_segment_new (void)
{
GstSegment *result;
result = g_slice_new0 (GstSegment);
result = g_new0 (GstSegment, 1);
gst_segment_init (result, GST_FORMAT_UNDEFINED);
return result;
@ -154,7 +155,7 @@ gst_segment_new (void)
void
gst_segment_free (GstSegment * segment)
{
g_slice_free (GstSegment, segment);
g_free (segment);
}
/**