V4L/DVB (9991): gspca - main: Check if a buffer has been queued on streamon.
authorJean-Francois Moine <moinejf@free.fr>
Fri, 19 Dec 2008 18:17:25 +0000 (15:17 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:39:42 +0000 (09:39 -0200)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c

index 66f60e38eecede31770fa46cc02bd8a3d5a0ac54..edb667028dfe4a89e706132cab30daa09edae579 100644 (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;
        }