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)
committerTim-Philipp Müller <tim@centricular.com>
Fri, 3 Oct 2014 11:36:27 +0000 (12:36 +0100)
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;
   }