Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285370
b: refs/heads/master
c: 3afedb9
h: refs/heads/master
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Dec 11, 2011
1 parent 462a0db commit d3a418e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c6a3b268e14ab99960028c9ad202b9aebae0a03
refs/heads/master: 3afedb95858bcc117b207a7c0a6767fe891bdfe9
14 changes: 7 additions & 7 deletions trunk/drivers/media/video/uvc/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,6 @@ static int uvc_video_decode_start(struct uvc_streaming *stream,
if (len < 2 || data[0] < 2 || data[0] > len)
return -EINVAL;

/* Skip payloads marked with the error bit ("error frames"). */
if (data[1] & UVC_STREAM_ERR) {
uvc_trace(UVC_TRACE_FRAME, "Dropping payload (error bit "
"set).\n");
return -ENODATA;
}

fid = data[1] & UVC_STREAM_FID;

/* Increase the sequence number regardless of any buffer states, so
Expand All @@ -432,6 +425,13 @@ static int uvc_video_decode_start(struct uvc_streaming *stream,
return -ENODATA;
}

/* Mark the buffer as bad if the error bit is set. */
if (data[1] & UVC_STREAM_ERR) {
uvc_trace(UVC_TRACE_FRAME, "Marking buffer as bad (error bit "
"set).\n");
buf->error = 1;
}

/* Synchronize to the input stream by waiting for the FID bit to be
* toggled when the the buffer state is not UVC_BUF_STATE_ACTIVE.
* stream->last_fid is initialized to -1, so the first isochronous
Expand Down

0 comments on commit d3a418e

Please sign in to comment.