]> err.no Git - linux-2.6/commitdiff
V4L/DVB (8661): gspca: Bug in the previous changeset about pac7311.
authorJean-Francois Moine <moinejf@free.fr>
Wed, 3 Sep 2008 19:47:22 +0000 (16:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 3 Sep 2008 21:36:27 +0000 (18:36 -0300)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/gspca/pac7311.c

index caa33292a08a90f899bd2952341154c2f87bff3a..96cd7f644adf40794ea979ddbf01a8e696388598 100644 (file)
@@ -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;