V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding the last packet.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
eebb876b0b
commit
f6b8332b5e
|
@ -270,13 +270,14 @@ static void sq905_dostream(struct work_struct *work)
|
||||||
}
|
}
|
||||||
frame = gspca_get_i_frame(gspca_dev);
|
frame = gspca_get_i_frame(gspca_dev);
|
||||||
if (frame && !discarding) {
|
if (frame && !discarding) {
|
||||||
gspca_frame_add(gspca_dev, packet_type,
|
frame = gspca_frame_add(gspca_dev, packet_type,
|
||||||
frame, data, data_len);
|
frame, data, data_len);
|
||||||
/* If entire frame fits in one packet we still
|
/* If entire frame fits in one packet we still
|
||||||
need to add a LAST_PACKET */
|
need to add a LAST_PACKET */
|
||||||
if ((packet_type == FIRST_PACKET) &&
|
if (packet_type == FIRST_PACKET &&
|
||||||
(bytes_left == 0))
|
bytes_left == 0)
|
||||||
gspca_frame_add(gspca_dev, LAST_PACKET,
|
frame = gspca_frame_add(gspca_dev,
|
||||||
|
LAST_PACKET,
|
||||||
frame, data, 0);
|
frame, data, 0);
|
||||||
} else {
|
} else {
|
||||||
discarding = 1;
|
discarding = 1;
|
||||||
|
|
Loading…
Reference in New Issue