Commit 1381dfd5 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

V4L/DVB (13122): gscpa - stv06xx + ov518: dont discard every other frame

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent a57c1dcb
......@@ -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;
}
......
......@@ -394,7 +394,8 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev,
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 "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment