glcolorconvert: Correct transform_caps direction

If GST_PAD_SINK is passed in this means that we're supposed to convert
from sink caps to src caps, not the other way around. In other words, if
GST_PAD_SINK is passed we're supposed to produce the possible output
caps.

Previously this was inverted. This had the effect that glcolorconvert
pretended to be able to convert *to* I420 without glDrawBuffers, which is
not possible, and pretended not to be able to convert *from* I420
without glDrawBuffers, which it always supports.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5947>
This commit is contained in:
Sebastian Dröge 2024-01-18 20:32:44 +02:00 committed by Tim-Philipp Müller
parent bf78a4d158
commit 4950fcc6de

View file

@ -1255,7 +1255,7 @@ gst_gl_color_convert_transform_caps (GstGLContext * context,
GstPadDirection direction, GstCaps * caps, GstCaps * filter)
{
caps = gst_gl_color_convert_caps_transform_format_info (context,
direction == GST_PAD_SRC, caps);
direction == GST_PAD_SINK, caps);
if (filter) {
GstCaps *tmp;