提交 19393a03 编写于 作者: M Mauro Carvalho Chehab

media: dvb_vb2: Use the sanitized value after processed by VB2 core

if the number of buffers requested by the user is too big, the
VB core will truncate to a valid value.

Use it, instead of what the user requested.
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 2c06aa7c
...@@ -35,7 +35,7 @@ static int _queue_setup(struct vb2_queue *vq, ...@@ -35,7 +35,7 @@ static int _queue_setup(struct vb2_queue *vq,
{ {
struct dvb_vb2_ctx *ctx = vb2_get_drv_priv(vq); struct dvb_vb2_ctx *ctx = vb2_get_drv_priv(vq);
*nbuffers = ctx->buf_cnt; ctx->buf_cnt = *nbuffers;
*nplanes = 1; *nplanes = 1;
sizes[0] = ctx->buf_siz; sizes[0] = ctx->buf_siz;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册