mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 11:32:51 +00:00
videoutils: return empty if the element has no possible allowed caps
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
This commit is contained in:
parent
f24075887f
commit
f492085552
1 changed files with 4 additions and 1 deletions
|
@ -56,9 +56,12 @@ __gst_video_element_proxy_getcaps (GstElement * element, GstPad * sinkpad,
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue