From: Christophe Fergeau Date: Sat, 6 Mar 2004 18:25:59 +0000 (+0000) Subject: gst/autoplug/gstspider.c: fixed caps leak X-Git-Tag: RELEASE-0_7_6~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91e07001487a095f7e2ba33a2dae618c172e7b24;p=platform%2Fupstream%2Fgstreamer.git gst/autoplug/gstspider.c: fixed caps leak Original commit message from CVS: 2004-03-06 Christophe Fergeau * gst/autoplug/gstspider.c: (gst_spider_identity_plug): fixed caps leak --- diff --git a/ChangeLog b/ChangeLog index d0d48f2097..dc1e78572e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-03-06 Christophe Fergeau + + * gst/autoplug/gstspider.c: (gst_spider_identity_plug): fixed caps + leak + 2004-03-05 David Schleef reviewed by: diff --git a/gst/autoplug/gstspider.c b/gst/autoplug/gstspider.c index b77794f31d..7182cc0bcd 100644 --- a/gst/autoplug/gstspider.c +++ b/gst/autoplug/gstspider.c @@ -394,13 +394,10 @@ gst_spider_identity_plug (GstSpiderIdentity *ident) GstCaps *src_caps = gst_pad_get_caps (ident->src); if (! gst_caps_is_empty (src_caps) && ! gst_caps_is_any (src_caps)) { - const char *mime; GList *factories; GstPadTemplate *padtemp; gboolean found = FALSE; - mime = gst_structure_get_name (gst_caps_get_structure (src_caps, 0)); - factories = spider->factories; while (factories) { @@ -414,12 +411,18 @@ gst_spider_identity_plug (GstSpiderIdentity *ident) } if (!found) { + const char *mime; + + mime = gst_structure_get_name (gst_caps_get_structure (src_caps, 0)); + GST_ELEMENT_ERROR (spider, STREAM, CODEC_NOT_FOUND, (_("There is no element present to handle the stream's mime type %s."), mime), (NULL)); + gst_caps_free (src_caps); return; } } + gst_caps_free (src_caps); }