V4L/DVB (13122): gscpa - stv06xx + ov518: dont discard every other frame
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Oct 2009 17:04:47 +0000 (14:04 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 7 Nov 2009 14:55:05 +0000 (12:55 -0200)
When we call gspca_frame_add, it returns a pointer to the frame passed in,
unless we call it with LAST_PACKET, when it will return a pointer to a
new frame in which to store the frame data for the next frame.

The frame pointer was not updated in stv06xx and ov518.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/stv06xx/stv06xx.c

index 2f6e135d94bc66cca7cab1319cfb673f4ee9b1f9..a5c190e93799df32e2f200c0b8034a8c3cc226cf 100644 (file)
@@ -2919,7 +2919,7 @@ static void ov518_pkt_scan(struct gspca_dev *gspca_dev,
        /* A false positive here is likely, until OVT gives me
         * the definitive SOF/EOF format */
        if ((!(data[0] | data[1] | data[2] | data[3] | data[5])) && data[6]) {
-               gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0);
+               frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0);
                gspca_frame_add(gspca_dev, FIRST_PACKET, frame, data, 0);
                sd->packet_nr = 0;
        }
index 65489d6b0d89ea0430fa3fdbec0e7bcc68cb1967..bfae63f5584c408f555f63b0a5ef8124fa566f5f 100644 (file)
@@ -394,7 +394,8 @@ frame_data:
                        PDEBUG(D_PACK, "End of frame detected");
 
                        /* Complete the last frame (if any) */
-                       gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, 0);
+                       frame = gspca_frame_add(gspca_dev, LAST_PACKET,
+                                               frame, data, 0);
 
                        if (chunk_len)
                                PDEBUG(D_ERR, "Chunk length is "