aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 15:47:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:36:27 -0400
commit23d9e4776b426d1f8a602e0e8d868154847f0dd4 (patch)
treed5f54a8e867f0540a96b368c5d9082f5f85178c4 /drivers/media
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>
Diffstat (limited to 'drivers/media')
-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,
610 continue; 610 continue;
611 switch (data[i + 1]) { 611 switch (data[i + 1]) {
612 case 0xd9: /* end of frame */ 612 case 0xd9: /* end of frame */
613 i += 2;
613 frame = gspca_frame_add(gspca_dev, 614 frame = gspca_frame_add(gspca_dev,
614 LAST_PACKET, 615 LAST_PACKET,
615 frame, data, i + 1); 616 frame, data, i);
616 data += INTER_FRAME; 617 data += i + INTER_FRAME;
617 len -= INTER_FRAME; 618 len -= i + INTER_FRAME;
618 i = 0; 619 i = 0;
619 if (len > LUM_OFFSET) 620 if (len > -LUM_OFFSET)
620 sd->lum_sum += data[-LUM_OFFSET]; 621 sd->lum_sum += data[-LUM_OFFSET];
621 if (len < 0) { 622 if (len < 0) {
622 sd->tosof = -len; 623 sd->tosof = -len;