mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gstparse: drop use of GSlice allocator
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
This commit is contained in:
parent
28dc56dc6c
commit
e675519a2c
3 changed files with 16 additions and 16 deletions
|
@ -84,7 +84,7 @@ gst_parse_context_new (void)
|
|||
#ifndef GST_DISABLE_PARSE
|
||||
GstParseContext *ctx;
|
||||
|
||||
ctx = g_slice_new (GstParseContext);
|
||||
ctx = g_new (GstParseContext, 1);
|
||||
ctx->missing_elements = NULL;
|
||||
|
||||
return ctx;
|
||||
|
@ -136,7 +136,7 @@ gst_parse_context_free (GstParseContext * context)
|
|||
if (context) {
|
||||
g_list_foreach (context->missing_elements, (GFunc) g_free, NULL);
|
||||
g_list_free (context->missing_elements);
|
||||
g_slice_free (GstParseContext, context);
|
||||
g_free (context);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ link_t *__gst_parse_link_new (void)
|
|||
{
|
||||
link_t *ret;
|
||||
__links++;
|
||||
ret = g_slice_new0 (link_t);
|
||||
ret = g_new0 (link_t, 1);
|
||||
/* g_print ("ALLOCATED LINK (%3u): %p\n", __links, ret); */
|
||||
return ret;
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ __gst_parse_link_free (link_t *data)
|
|||
{
|
||||
if (data) {
|
||||
/* g_print ("FREEING LINK (%3u): %p\n", __links - 1, data); */
|
||||
g_slice_free (link_t, data);
|
||||
g_free (data);
|
||||
g_return_if_fail (__links > 0);
|
||||
__links--;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ __gst_parse_chain_new (void)
|
|||
{
|
||||
chain_t *ret;
|
||||
__chains++;
|
||||
ret = g_slice_new0 (chain_t);
|
||||
ret = g_new0 (chain_t, 1);
|
||||
/* g_print ("@%p: ALLOCATED CHAIN (%3u):\n", ret, __chains); */
|
||||
return ret;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ void
|
|||
__gst_parse_chain_free (chain_t *data)
|
||||
{
|
||||
/* g_print ("@%p: FREEING CHAIN (%3u):\n", data, __chains - 1); */
|
||||
g_slice_free (chain_t, data);
|
||||
g_free (data);
|
||||
g_return_if_fail (__chains > 0);
|
||||
__chains--;
|
||||
}
|
||||
|
@ -282,7 +282,7 @@ static void gst_parse_free_delayed_set (DelayedSet *set)
|
|||
{
|
||||
g_free(set->name);
|
||||
g_free(set->value_str);
|
||||
g_slice_free(DelayedSet, set);
|
||||
g_free(set);
|
||||
}
|
||||
|
||||
static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
|
||||
|
@ -290,7 +290,7 @@ static void gst_parse_new_child(GstChildProxy *child_proxy, GObject *object,
|
|||
|
||||
static void gst_parse_add_delayed_set (GstElement *element, gchar *name, gchar *value_str)
|
||||
{
|
||||
DelayedSet *data = g_slice_new0 (DelayedSet);
|
||||
DelayedSet *data = g_new0 (DelayedSet, 1);
|
||||
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_PIPELINE, element, "delaying property set %s to %s",
|
||||
name, value_str);
|
||||
|
@ -835,7 +835,7 @@ static void gst_parse_free_delayed_link (DelayedLink *link)
|
|||
g_free (link->src_pad);
|
||||
g_free (link->sink_pad);
|
||||
if (link->caps) gst_caps_unref (link->caps);
|
||||
g_slice_free (DelayedLink, link);
|
||||
g_free (link);
|
||||
}
|
||||
|
||||
#define PRETTY_PAD_NAME_FMT "%s %s of %s named %s"
|
||||
|
@ -901,7 +901,7 @@ gst_parse_perform_delayed_link (GstElement *src, const gchar *src_pad,
|
|||
if ((GST_PAD_TEMPLATE_DIRECTION (templ) == GST_PAD_SRC) &&
|
||||
(GST_PAD_TEMPLATE_PRESENCE(templ) == GST_PAD_SOMETIMES))
|
||||
{
|
||||
DelayedLink *data = g_slice_new (DelayedLink);
|
||||
DelayedLink *data = g_new (DelayedLink, 1);
|
||||
|
||||
data->all_pads = all_pads;
|
||||
|
||||
|
|
|
@ -75,12 +75,12 @@ G_GNUC_INTERNAL void __gst_parse_element_free (element_t *data);
|
|||
#else /* __GST_PARSE_TRACE */
|
||||
# define gst_parse_strdup g_strdup
|
||||
# define gst_parse_strfree g_free
|
||||
# define gst_parse_link_new() g_slice_new0 (link_t)
|
||||
# define gst_parse_link_free(l) g_slice_free (link_t, l)
|
||||
# define gst_parse_chain_new() g_slice_new0 (chain_t)
|
||||
# define gst_parse_chain_free(c) g_slice_free (chain_t, c)
|
||||
# define gst_parse_element_new() g_slice_new0 (element_t)
|
||||
# define gst_parse_element_free(e) g_slice_free (element_t, e)
|
||||
# define gst_parse_link_new() g_new0 (link_t, 1)
|
||||
# define gst_parse_link_free(l) g_free (l)
|
||||
# define gst_parse_chain_new() g_new0 (chain_t, 1)
|
||||
# define gst_parse_chain_free(c) g_free (c)
|
||||
# define gst_parse_element_new() g_new0 (element_t, 1)
|
||||
# define gst_parse_element_free(e) g_free (e)
|
||||
#endif /* __GST_PARSE_TRACE */
|
||||
|
||||
static inline void
|
||||
|
|
Loading…
Reference in a new issue