Commit 5f9826e8 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab

[media] coda: fix try_fmt_vid_out colorspace setting

v4l2-compliance complains about invalid colorspace settings being accepted
on the output side. This patch only allows REC709 and JPEG.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent f77fd8a9
......@@ -592,7 +592,11 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv,
if (ret < 0)
return ret;
if (!f->fmt.pix.colorspace) {
switch (f->fmt.pix.colorspace) {
case V4L2_COLORSPACE_REC709:
case V4L2_COLORSPACE_JPEG:
break;
default:
if (f->fmt.pix.pixelformat == V4L2_PIX_FMT_JPEG)
f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment