From 16bace45f0bc0ede6e2cc59c133c34b27b37d8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 18 Jan 2024 20:32:44 +0200 Subject: [PATCH] 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: --- .../gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c index 6651ebdc4b..d630436ddd 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c @@ -1280,7 +1280,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;