1
0

V4L/DVB (9991): gspca - main: Check if a buffer has been queued on streamon.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Jean-Francois Moine
2008-12-19 15:17:25 -03:00
committed by Mauro Carvalho Chehab
parent 13752bd9c9
commit 1edabe7127

View File

@@ -1226,7 +1226,8 @@ static int vidioc_streamon(struct file *file, void *priv,
ret = -ENODEV;
goto out;
}
if (gspca_dev->nframes == 0) {
if (gspca_dev->nframes == 0
|| !(gspca_dev->frame[0].v4l2_buf.flags & V4L2_BUF_FLAG_QUEUED)) {
ret = -EINVAL;
goto out;
}