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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2786>
This commit is contained in:
Mark Nauwelaerts 2022-07-22 14:51:11 +02:00 committed by GStreamer Marge Bot
parent ea47a82e9e
commit b5707e2371

View file

@ -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);
/* 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_structure_remove_field (structure, "colorimetry");
gst_structure_remove_field (structure, "chroma-site");
gst_caps_append_structure (to, structure);
}