When drm does not find any format, the allowed_caps is
empty one and need to be unref by the caller.
Fix #1268
out_caps = gst_caps_merge (out_caps, gst_caps_simplify (tmp_caps));
}
+ if (gst_caps_is_empty (out_caps)) {
+ GST_DEBUG_OBJECT (self, "allowed caps is empty");
+ gst_caps_unref (out_caps);
+ return FALSE;
+ }
+
self->allowed_caps = gst_caps_simplify (out_caps);
GST_DEBUG_OBJECT (self, "allowed caps = %" GST_PTR_FORMAT,
self->allowed_caps);
- return (self->allowed_caps && !gst_caps_is_empty (self->allowed_caps));
+ return TRUE;
}
static gboolean