summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-12-19 21:17:25 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 14:39:42 +0300
commit1edabe71277a394b306fcb9a28a1977f345c8a20 (patch)
treec31f50a6372654e83940609794b3e0c7c5f493ed
parent13752bd9c9db4b9baf847fcb6bb281ba48466dd3 (diff)
downloadlinux-1edabe71277a394b306fcb9a28a1977f345c8a20.tar.xz
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>
-rw-r--r--drivers/media/video/gspca/gspca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 66f60e38eece..edb667028dfe 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -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;
}