summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 16:47:22 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 18:36:27 -0300
commit23d9e4776b426d1f8a602e0e8d868154847f0dd4 (patch)
treed5f54a8e867f0540a96b368c5d9082f5f85178c4
parente52a5574de9d3bb297a26566871eabcbdfab13b5 (diff)
V4L/DVB (8661): gspca: Bug in the previous changeset about pac7311.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/gspca/pac7311.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
index caa33292a08a..96cd7f644adf 100644
--- a/drivers/media/video/gspca/pac7311.c
+++ b/drivers/media/video/gspca/pac7311.c
@@ -610,13 +610,14 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
continue;
switch (data[i + 1]) {
case 0xd9: /* end of frame */
+ i += 2;
frame = gspca_frame_add(gspca_dev,
LAST_PACKET,
- frame, data, i + 1);
- data += INTER_FRAME;
- len -= INTER_FRAME;
+ frame, data, i);
+ data += i + INTER_FRAME;
+ len -= i + INTER_FRAME;
i = 0;
- if (len > LUM_OFFSET)
+ if (len > -LUM_OFFSET)
sd->lum_sum += data[-LUM_OFFSET];
if (len < 0) {
sd->tosof = -len;