mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
segment: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
19a6468a53
commit
eeced74fce
1 changed files with 4 additions and 3 deletions
|
@ -20,6 +20,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "glib-compat-private.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ gst_segment_copy (const GstSegment * segment)
|
||||||
GstSegment *result = NULL;
|
GstSegment *result = NULL;
|
||||||
|
|
||||||
if (segment) {
|
if (segment) {
|
||||||
result = (GstSegment *) g_slice_copy (sizeof (GstSegment), segment);
|
result = (GstSegment *) g_memdup2 (segment, sizeof (GstSegment));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +140,7 @@ gst_segment_new (void)
|
||||||
{
|
{
|
||||||
GstSegment *result;
|
GstSegment *result;
|
||||||
|
|
||||||
result = g_slice_new0 (GstSegment);
|
result = g_new0 (GstSegment, 1);
|
||||||
gst_segment_init (result, GST_FORMAT_UNDEFINED);
|
gst_segment_init (result, GST_FORMAT_UNDEFINED);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
@ -154,7 +155,7 @@ gst_segment_new (void)
|
||||||
void
|
void
|
||||||
gst_segment_free (GstSegment * segment)
|
gst_segment_free (GstSegment * segment)
|
||||||
{
|
{
|
||||||
g_slice_free (GstSegment, segment);
|
g_free (segment);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue