gl: upload: Return all possible caps on transform_caps when filter is NULL or ANY

When upstream query downstream caps without filter it expects downstream
to return all possible caps.
This commit is contained in:
Thibault Saunier 2023-04-13 16:12:05 -04:00
parent 2e76371666
commit 17e7a78e70

View file

@ -2459,7 +2459,7 @@ gst_gl_upload_transform_caps (GstGLUpload * upload, GstGLContext * context,
GstCaps *result, *tmp;
gint i;
if (upload->priv->method) {
if (upload->priv->method && filter && !gst_caps_is_any (filter)) {
tmp = upload->priv->method->transform_caps (upload->priv->method_impl,
context, direction, caps);
@ -2477,13 +2477,7 @@ gst_gl_upload_transform_caps (GstGLUpload * upload, GstGLContext * context,
gst_caps_features_free (passthrough);
}
if (filter) {
result =
gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
gst_caps_unref (tmp);
} else {
result = tmp;
}
result = gst_caps_intersect_full (filter, tmp, GST_CAPS_INTERSECT_FIRST);
if (!gst_caps_is_empty (result))
return result;
else