summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-12-14 14:57:49 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-01-17 11:31:34 -0200
commit8c32aa5945cb05bb2ff8a91485d4477fbe55cf00 (patch)
treeeef6a7fa0c42fd178474d912041e60ddeb6b0a13 /drivers/media/video/gspca/gspca.c
parent6ccf80eb15ccaca4d3f1ab5162b9ded5eecd9971 (diff)
downloadblackbird-op-linux-8c32aa5945cb05bb2ff8a91485d4477fbe55cf00.tar.gz
blackbird-op-linux-8c32aa5945cb05bb2ff8a91485d4477fbe55cf00.zip
V4L/DVB (13816): gspca - main: Set the current frame pointer when first qbuf.
When not set, some images could be lost. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index e930a67d526b..bd6214d4ab3b 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1815,6 +1815,8 @@ static int vidioc_qbuf(struct file *file, void *priv,
/* put the buffer in the 'queued' queue */
i = gspca_dev->fr_q;
gspca_dev->fr_queue[i] = index;
+ if (gspca_dev->fr_i == i)
+ gspca_dev->cur_frame = frame;
gspca_dev->fr_q = (i + 1) % gspca_dev->nframes;
PDEBUG(D_FRAM, "qbuf q:%d i:%d o:%d",
gspca_dev->fr_q,
OpenPOWER on IntegriCloud