提交 d27d5f1a 编写于 作者: H Helen Fornazier 提交者: Mauro Carvalho Chehab

[media] stk1160: Check *nplanes in queue_setup

If *nplanes is not zero, it should use the requested size if valid
Signed-off-by: NHelen Koike <helen.koike@collabora.co.uk>
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 f4bca74f
......@@ -680,6 +680,9 @@ static int queue_setup(struct vb2_queue *vq,
*nbuffers = clamp_t(unsigned int, *nbuffers,
STK1160_MIN_VIDEO_BUFFERS, STK1160_MAX_VIDEO_BUFFERS);
if (*nplanes)
return sizes[0] < size ? -EINVAL : 0;
/* This means a packed colorformat */
*nplanes = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册