[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: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
parent
f77fd8a9b1
commit
5f9826e8a7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue