The direct dmabuf upload does color conversion, so when it transforms
the caps, it replaces the format with all formats found through the
format query. When this uploader can't be used, it makes the upstream
source pick a unsupported format.
To fix this, we only append the caps with a list of format. So the
source will only pick one of these formats if the downstream preferred
format is not supported. A negotiation failure after this would be
normal.
This fixes pipelines without a glcolorconvert element.
https://bugzilla.gnome.org/show_bug.cgi?id=783521
g_value_init (&formats, GST_TYPE_LIST);
gst_value_deserialize (&formats, format_str);
- gst_caps_set_value (ret, "format", &formats);
+ tmp = gst_caps_copy (ret);
+ gst_caps_set_value (tmp, "format", &formats);
+ gst_caps_append (ret, tmp);
g_free (format_str);
g_value_unset (&formats);