From 1c87cda56df43b736c7a8c1c8943b71178e9bda3 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Sun, 5 May 2024 17:48:32 +0100 Subject: [PATCH] glcolorconvert: Fix caps negotiation with upstream DMABuf The uninitialized texture target was leading to a NULL texture-target string added to the output caps. Fixes #3519 Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 6003b20503..031f682507 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c @@ -1796,7 +1796,7 @@ gst_gl_color_convert_fixate_format_target (GstCaps * caps, GstCaps * result) const GstVideoFormatInfo *in_info, *out_info = NULL; const GValue *targets; guint targets_mask = 0; - GstGLTextureTarget target; + GstGLTextureTarget target = GST_GL_TEXTURE_TARGET_NONE; gint min_loss = G_MAXINT; guint i, capslen; @@ -1860,7 +1860,7 @@ gst_gl_color_convert_fixate_format_target (GstCaps * caps, GstCaps * result) if (out_info) gst_structure_set (outs, "format", G_TYPE_STRING, GST_VIDEO_FORMAT_INFO_NAME (out_info), NULL); - if (target) + if (target != GST_GL_TEXTURE_TARGET_NONE) gst_structure_set (outs, "texture-target", G_TYPE_STRING, gst_gl_texture_target_to_string (target), NULL); }