Commit 19393a03 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 2c06aa7c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static int _queue_setup(struct vb2_queue *vq,
{
	struct dvb_vb2_ctx *ctx = vb2_get_drv_priv(vq);

	*nbuffers = ctx->buf_cnt;
	ctx->buf_cnt = *nbuffers;
	*nplanes = 1;
	sizes[0] = ctx->buf_siz;