Instead of returning the template caps and having a failure happen
later because there are no possible caps
https://bugzilla.gnome.org/show_bug.cgi?id=741263
gst_pad_get_pad_template_caps (sinkpad);
allowed = gst_pad_get_allowed_caps (srcpad);
- if (!allowed || gst_caps_is_empty (allowed) || gst_caps_is_any (allowed)) {
+ if (!allowed || gst_caps_is_any (allowed)) {
fcaps = templ_caps;
goto done;
+ } else if (gst_caps_is_empty (allowed)) {
+ fcaps = gst_caps_ref (allowed);
+ goto done;
}
GST_LOG_OBJECT (element, "template caps %" GST_PTR_FORMAT, templ_caps);