baseparse: sinkcaps can be NULL in default caps negotiation
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 21 Jun 2017 14:48:52 +0000 (10:48 -0400)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 3 Jul 2017 19:47:39 +0000 (20:47 +0100)
This was causing harmless assertion about the unreffed caps not being of
type caps.

https://bugzilla.gnome.org/show_bug.cgi?id=784041

libs/gst/base/gstbaseparse.c

index 4b45280..8da034b 100644 (file)
@@ -1084,7 +1084,8 @@ gst_base_parse_negotiate_default_caps (GstBaseParse * parse)
   GST_INFO_OBJECT (parse,
       "Chose default caps %" GST_PTR_FORMAT " for initial gap", default_caps);
 
-  gst_caps_unref (sinkcaps);
+  if (sinkcaps)
+    gst_caps_unref (sinkcaps);
   gst_caps_unref (caps);
 
   return default_caps;