baseparse: don't leak caps in gst_base_parse_process_streamheader
authorMatej Knopp <matej.knopp@gmail.com>
Thu, 2 Oct 2014 01:30:24 +0000 (03:30 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Thu, 2 Oct 2014 07:39:54 +0000 (10:39 +0300)
https://bugzilla.gnome.org/show_bug.cgi?id=737762

libs/gst/base/gstbaseparse.c

index 8fd1103..7f29afa 100644 (file)
@@ -2756,10 +2756,16 @@ gst_base_parse_process_streamheader (GstBaseParse * parse)
         GST_OBJECT_CAST (parse), gst_buffer_ref (buffer));
   }
 
+  gst_caps_unref (caps);
+
   return ret;
 
 notfound:
   {
+    if (caps) {
+      gst_caps_unref (caps);
+    }
+
     GST_DEBUG_OBJECT (parse, "No streamheader on caps");
     return GST_FLOW_OK;
   }