mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
gst/autoplug/gstspider.c: don't ref the element, adding already reffed it. And we didn't unref it later anyway... (hu...
Original commit message from CVS: * gst/autoplug/gstspider.c: (gst_spider_link_add): don't ref the element, adding already reffed it. And we didn't unref it later anyway... (huge memleak when you used many spider elements) * gst/gstelement.c: (gst_element_base_class_finalize): * gst/gstelementfactory.c: (gst_element_factory_cleanup), (gst_element_register): * gst/gsturi.c: (gst_element_make_from_uri): use gst_object_(un)ref instead of g_object(un)ref
This commit is contained in:
parent
b107a0a3ef
commit
beb197fd35
5 changed files with 15 additions and 6 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-04-06 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/autoplug/gstspider.c: (gst_spider_link_add):
|
||||
don't ref the element, adding already reffed it. And we didn't unref
|
||||
it later anyway... (huge memleak when you used many spider elements)
|
||||
* gst/gstelement.c: (gst_element_base_class_finalize):
|
||||
* gst/gstelementfactory.c: (gst_element_factory_cleanup),
|
||||
(gst_element_register):
|
||||
* gst/gsturi.c: (gst_element_make_from_uri):
|
||||
use gst_object_(un)ref instead of g_object(un)ref
|
||||
|
||||
2004-04-06 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/gstbuffer.h:
|
||||
|
|
|
@ -364,8 +364,6 @@ gst_spider_link_reset (GstSpiderConnection * conn, GstElement * to)
|
|||
static void
|
||||
gst_spider_link_add (GstSpiderConnection * conn, GstElement * element)
|
||||
{
|
||||
gst_object_ref ((GstObject *) element);
|
||||
gst_object_sink ((GstObject *) element);
|
||||
conn->path = g_list_prepend (conn->path, element);
|
||||
conn->current = element;
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ gst_element_base_class_finalize (gpointer g_class)
|
|||
{
|
||||
GstElementClass *klass = GST_ELEMENT_CLASS (g_class);
|
||||
|
||||
g_list_foreach (klass->padtemplates, (GFunc) g_object_unref, NULL);
|
||||
g_list_foreach (klass->padtemplates, (GFunc) gst_object_unref, NULL);
|
||||
g_list_free (klass->padtemplates);
|
||||
__gst_element_details_clear (&klass->details);
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ gst_element_factory_cleanup (GstElementFactory * factory)
|
|||
factory->type = 0;
|
||||
}
|
||||
|
||||
g_list_foreach (factory->padtemplates, (GFunc) g_object_unref, NULL);
|
||||
g_list_foreach (factory->padtemplates, (GFunc) gst_object_unref, NULL);
|
||||
g_list_free (factory->padtemplates);
|
||||
factory->padtemplates = NULL;
|
||||
factory->numpadtemplates = 0;
|
||||
|
@ -218,7 +218,7 @@ gst_element_register (GstPlugin * plugin, const gchar * name, guint rank,
|
|||
factory->type = type;
|
||||
__gst_element_details_copy (&factory->details, &klass->details);
|
||||
factory->padtemplates = g_list_copy (klass->padtemplates);
|
||||
g_list_foreach (factory->padtemplates, (GFunc) g_object_ref, NULL);
|
||||
g_list_foreach (factory->padtemplates, (GFunc) gst_object_ref, NULL);
|
||||
factory->numpadtemplates = klass->numpadtemplates;
|
||||
|
||||
/* special stuff for URI handling */
|
||||
|
|
|
@ -280,7 +280,7 @@ gst_element_make_from_uri (const GstURIType type, const gchar * uri,
|
|||
|
||||
if (gst_uri_handler_set_uri (handler, uri))
|
||||
break;
|
||||
g_object_unref (ret);
|
||||
gst_object_unref (GST_OBJECT (ret));
|
||||
ret = NULL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue