From b5707e2371515eca10c8acf6fd8926a725c52ee9 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Fri, 22 Jul 2022 14:51:11 +0200 Subject: [PATCH] videobox: avoid dropping caps fields for passthrough caps transform Fixes potential negotiation failure in case downstream element is a bit picky regarding the fields in question. Part-of: --- subprojects/gst-plugins-good/gst/videobox/gstvideobox.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-good/gst/videobox/gstvideobox.c b/subprojects/gst-plugins-good/gst/videobox/gstvideobox.c index 9c69e49..302e714 100644 --- a/subprojects/gst-plugins-good/gst/videobox/gstvideobox.c +++ b/subprojects/gst-plugins-good/gst/videobox/gstvideobox.c @@ -2949,11 +2949,13 @@ gst_video_box_transform_caps (GstBaseTransform * trans, gst_structure_set_value (structure, "format", &val); g_value_unset (&val); g_value_unset (&list); - } - - gst_structure_remove_field (structure, "colorimetry"); - gst_structure_remove_field (structure, "chroma-site"); + /* format list above makes for non-fixed caps; + * so basetransform and peers will be enlisted to decide these parts, + * otherwise leave as-is for passthrough case */ + gst_structure_remove_field (structure, "colorimetry"); + gst_structure_remove_field (structure, "chroma-site"); + } gst_caps_append_structure (to, structure); } -- 2.7.4