From 9595fd08e3487214b6f9551f74374e09a5e7a1f7 Mon Sep 17 00:00:00 2001
From: Philipp Zabel
Date: Thu, 9 Aug 2018 17:24:35 +0200
Subject: [PATCH] v4l2object: stop V4L2 from zeroing extended colorimetry for
non-mplane
Setting the priv field to a magic value stops V4L2 core from zeroing
the extended colorimetry fields quantization, ycbcr_enc, and xfer_func
for non-mplane queues.
https://bugzilla.gnome.org/show_bug.cgi?id=796940
---
sys/v4l2/gstv4l2object.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c
index 39b696a65f..4b650a0c02 100644
--- a/sys/v4l2/gstv4l2object.c
+++ b/sys/v4l2/gstv4l2object.c
@@ -3460,6 +3460,7 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps,
format.fmt.pix_mp.ycbcr_enc = matrix;
format.fmt.pix_mp.xfer_func = transfer;
} 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;