aacparse: Also only unref caps if they're not NULL
authorSebastian Dröge <sebastian@centricular.com>
Wed, 10 Dec 2014 10:35:29 +0000 (11:35 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 10 Dec 2014 10:35:29 +0000 (11:35 +0100)
gst/audioparsers/gstaacparse.c

index 6b85d98..415e665 100644 (file)
@@ -249,7 +249,8 @@ gst_aac_parse_set_src_caps (GstAacParse * aacparse, GstCaps * sink_caps)
       }
     }
   }
-  gst_caps_unref (allowed);
+  if (allowed)
+    gst_caps_unref (allowed);
 
   GST_DEBUG_OBJECT (aacparse, "setting src caps: %" GST_PTR_FORMAT, src_caps);