From 86dddfa61c0bdfcb96ba6c379721e0393d2984a0 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 17 Sep 2024 13:28:45 -0400 Subject: [PATCH] v4l2object: Always tell capture queue that we want to set the CSC Not all drivers supports it, but in general we want to try and match the negotiated caps, so lets always try to set the CSC. Part-of: --- subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c index 8b158b1da9..e9932e3113 100644 --- a/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c +++ b/subprojects/gst-plugins-good/sys/v4l2/gstv4l2object.c @@ -3898,12 +3898,16 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps, format.fmt.pix_mp.quantization = range; format.fmt.pix_mp.ycbcr_enc = matrix; format.fmt.pix_mp.xfer_func = transfer; + if (V4L2_TYPE_IS_CAPTURE (v4l2object->type)) + format.fmt.pix_mp.flags |= V4L2_PIX_FMT_FLAG_SET_CSC; } else { format.fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC; format.fmt.pix.colorspace = colorspace; format.fmt.pix.quantization = range; format.fmt.pix.ycbcr_enc = matrix; format.fmt.pix.xfer_func = transfer; + if (V4L2_TYPE_IS_CAPTURE (v4l2object->type)) + format.fmt.pix.flags |= V4L2_PIX_FMT_FLAG_SET_CSC; } GST_DEBUG_OBJECT (v4l2object->dbg_obj, "Desired colorspace is %d:%d:%d:%d",