glupload: Do prepend the preferred caps
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 31 Oct 2018 18:26:42 +0000 (18:26 +0000)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 1 Nov 2018 10:22:28 +0000 (06:22 -0400)
commitc8c7672ffb2d46fbfdfbbd014332428ca2f6446a
treef24d6a87aaa52b4a6495a29eeedb651914888647
parentc2ec68f0c7c2ed59668b41d82d7dae2de16f001e
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
gst-libs/gst/gl/gstglupload.c