[media] gspca - ov519: Fix a regression for ovfx2 webcams
authorJean-François Moine <moinejf@free.fr>
Sun, 22 May 2011 07:56:32 +0000 (04:56 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 1 Jun 2011 11:25:56 +0000 (08:25 -0300)
By git commit c42cedbb658b, the bulk transfer size was changed to a lower
value for resolutions != 1600x1200, but the image extraction routine still
worked with the previous value, giving bad truncated images.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/ov519.c

index 36a46fc787341b86dbd8ceaa1fef5c1ab21541b7..5ac2f3c5371060608ece3b98e6587b23bd644c08 100644 (file)
@@ -4478,7 +4478,7 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev,
        gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
 
        /* A short read signals EOF */
-       if (len < OVFX2_BULK_SIZE) {
+       if (len < gspca_dev->cam.bulk_size) {
                /* If the frame is short, and it is one of the first ones
                   the sensor and bridge are still syncing, so drop it. */
                if (sd->first_frame) {