basetransform: Do not check if NULL is an emtpy caps
authorThibault Saunier <tsaunier@igalia.com>
Thu, 19 Jul 2018 01:13:57 +0000 (21:13 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 19 Jul 2018 01:18:56 +0000 (21:18 -0400)
gst_base_transform_transform_caps can return NULL in various conditions
thus we should not treat its result as valid caps.

In all other places NULL is properly handled.

libs/gst/base/gstbasetransform.c

index 9215269..5ddad78 100644 (file)
@@ -652,7 +652,7 @@ gst_base_transform_query_caps (GstBaseTransform * trans, GstPad * pad,
     GST_DEBUG_OBJECT (pad, "transformed  %" GST_PTR_FORMAT, peerfilter);
     gst_caps_unref (temp);
 
-    if (!gst_caps_is_empty (peerfilter)) {
+    if (peerfilter && !gst_caps_is_empty (peerfilter)) {
       /* and filter against the template of the other pad */
       GST_DEBUG_OBJECT (pad, "our template  %" GST_PTR_FORMAT, otempl);
       /* We keep the caps sorted like the returned caps */