mirror of
https://github.com/torvalds/linux.git
synced 2024-12-19 01:23:20 +00:00
[media] gspca - main: Have discontinuous sequence numbers when frames are lost
This patch also sets to 0 the sequence of the first frame. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
3e9c2b8477
commit
2e0544a8ac
@ -432,12 +432,13 @@ void gspca_frame_add(struct gspca_dev *gspca_dev,
|
||||
/* if there are no queued buffer, discard the whole frame */
|
||||
if (i == atomic_read(&gspca_dev->fr_q)) {
|
||||
gspca_dev->last_packet_type = DISCARD_PACKET;
|
||||
gspca_dev->sequence++;
|
||||
return;
|
||||
}
|
||||
j = gspca_dev->fr_queue[i];
|
||||
frame = &gspca_dev->frame[j];
|
||||
frame->v4l2_buf.timestamp = ktime_to_timeval(ktime_get());
|
||||
frame->v4l2_buf.sequence = ++gspca_dev->sequence;
|
||||
frame->v4l2_buf.sequence = gspca_dev->sequence++;
|
||||
gspca_dev->image = frame->data;
|
||||
gspca_dev->image_len = 0;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user