V4L/DVB (10348): gspca - mars: Bad isoc packet scanning.
authorJean-Francois Moine <moinejf@free.fr>
Thu, 8 Jan 2009 19:30:58 +0000 (16:30 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:30 +0000 (12:42 -0300)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/mars.c

index e85ba1aa8bd3dc1a9ea7f14ea8b8b0f8a51b5de1..1eeac4041a61374e76ed3513eb7a933277dc455f 100644 (file)
@@ -325,12 +325,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
                                PDEBUG(D_PACK, "sof offset: %d len: %d",
                                        p, len);
                                frame = gspca_frame_add(gspca_dev, LAST_PACKET,
-                                                       frame, data, 0);
+                                                       frame, data, p);
 
                                /* put the JPEG header */
                                jpeg_put_header(gspca_dev, frame, 0x21);
-                               data += 16;
-                               len -= 16;
+                               data += p + 16;
+                               len -= p + 16;
                                break;
                        }
                }