mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-01 13:49:58 +00:00
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
This commit is contained in:
parent
c2ec68f0c7
commit
c8c7672ffb
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue