Skip to content

Commit

Permalink
V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding…
Browse files Browse the repository at this point in the history
… the last packet.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent eebb876 commit f6b8332
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/media/video/gspca/sq905.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,14 @@ static void sq905_dostream(struct work_struct *work)
}
frame = gspca_get_i_frame(gspca_dev);
if (frame && !discarding) {
gspca_frame_add(gspca_dev, packet_type,
frame = gspca_frame_add(gspca_dev, packet_type,
frame, data, data_len);
/* If entire frame fits in one packet we still
need to add a LAST_PACKET */
if ((packet_type == FIRST_PACKET) &&
(bytes_left == 0))
gspca_frame_add(gspca_dev, LAST_PACKET,
if (packet_type == FIRST_PACKET &&
bytes_left == 0)
frame = gspca_frame_add(gspca_dev,
LAST_PACKET,
frame, data, 0);
} else {
discarding = 1;
Expand Down

0 comments on commit f6b8332

Please sign in to comment.