mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Fix some memleaks:
Original commit message from CVS: Fix some memleaks: * gst/autoplug/gstspider.c: (gst_spider_request_new_pad), (gst_spider_plug_from_srcpad): * gst/autoplug/gstspideridentity.c: (gst_spider_identity_link):
This commit is contained in:
parent
0f357a0852
commit
149b17079e
3 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-02-04 David Schleef <ds@schleef.org>
|
||||
|
||||
Fix some memleaks:
|
||||
* gst/autoplug/gstspider.c: (gst_spider_request_new_pad),
|
||||
(gst_spider_plug_from_srcpad):
|
||||
* gst/autoplug/gstspideridentity.c: (gst_spider_identity_link):
|
||||
|
||||
2004-02-04 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/gstelement.c: (gst_element_clear_pad_caps): Make sure we have
|
||||
|
|
|
@ -211,6 +211,7 @@ gst_spider_request_new_pad (GstElement *element, GstPadTemplate *templ, const gc
|
|||
gst_bin_add (GST_BIN (element), GST_ELEMENT (identity));
|
||||
|
||||
returnpad = gst_element_add_ghost_pad (element, returnpad, padname);
|
||||
g_free (padname);
|
||||
gst_spider_link_new (identity);
|
||||
GST_DEBUG ("successuflly created requested pad %s:%s", GST_DEBUG_PAD_NAME (returnpad));
|
||||
|
||||
|
@ -588,6 +589,8 @@ gst_spider_plug_from_srcpad (GstSpiderConnection *conn, GstPad *srcpad)
|
|||
gboolean result = TRUE;
|
||||
GstSpider *spider = (GstSpider *) GST_OBJECT_PARENT (conn->src);
|
||||
GstElement *startelement = conn->current;
|
||||
GstCaps *caps1;
|
||||
GstCaps *caps2;
|
||||
|
||||
g_assert ((GstElement *) GST_OBJECT_PARENT (srcpad) == conn->current);
|
||||
GST_DEBUG ("trying to plug from %s:%s to %s",
|
||||
|
@ -603,7 +606,11 @@ gst_spider_plug_from_srcpad (GstSpiderConnection *conn, GstPad *srcpad)
|
|||
}
|
||||
|
||||
/* find a path from src to sink */
|
||||
plugpath = gst_autoplug_sp (gst_pad_get_caps (srcpad), gst_pad_get_caps (conn->src->sink), spider->factories);
|
||||
caps1 = gst_pad_get_caps (srcpad);
|
||||
caps2 = gst_pad_get_caps (conn->src->sink);
|
||||
plugpath = gst_autoplug_sp (caps1, caps2, spider->factories);
|
||||
gst_caps_free (caps1);
|
||||
gst_caps_free (caps2);
|
||||
|
||||
/* prints out the path that was found for plugging */
|
||||
/* g_print ("found path from %s to %s:\n", GST_ELEMENT_NAME (conn->current), GST_ELEMENT_NAME (conn->src));
|
||||
|
|
|
@ -236,7 +236,7 @@ gst_spider_identity_link (GstPad *pad, const GstCaps *caps)
|
|||
if (GST_PAD_PEER (otherpad) == NULL)
|
||||
return GST_PAD_LINK_DELAYED;
|
||||
|
||||
return gst_pad_try_set_caps (otherpad, gst_caps_copy (caps));
|
||||
return gst_pad_try_set_caps (otherpad, caps);
|
||||
}
|
||||
|
||||
static GstCaps*
|
||||
|
|
Loading…
Reference in a new issue