Commit c8c7672f authored by Nicolas Dufresne's avatar Nicolas Dufresne

glupload: Do prepend the preferred caps

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
parent c2ec68f0
......@@ -848,7 +848,9 @@ _direct_dma_buf_upload_transform_caps (gpointer impl, GstGLContext * context,
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment