Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124571
b: refs/heads/master
c: f8dd4af
h: refs/heads/master
i:
  124569: 8fe8708
  124567: d5602cf
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 96956e5 commit 7ca1a31
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 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: 4e96fd088cf6fb95ba4b212e5e72bac1e6d34e79
refs/heads/master: f8dd4af6d44b4b738f125f6a21afa885f3b1d13b
19 changes: 9 additions & 10 deletions trunk/drivers/media/video/uvc/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ static int uvc_video_decode_start(struct uvc_video_device *video,

/* 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.
* queue->last_fid is initialized to -1, so the first isochronous
* video->last_fid is initialized to -1, so the first isochronous
* frame will always be in sync.
*
* If the device doesn't toggle the FID bit, invert video->last_fid
Expand All @@ -395,7 +395,7 @@ static int uvc_video_decode_start(struct uvc_video_device *video,
* last payload can be lost anyway). We thus must check if the FID has
* been toggled.
*
* queue->last_fid is initialized to -1, so the first isochronous
* video->last_fid is initialized to -1, so the first isochronous
* frame will never trigger an end of frame detection.
*
* Empty buffers (bytesused == 0) don't trigger end of frame detection
Expand Down Expand Up @@ -512,7 +512,7 @@ static void uvc_video_decode_bulk(struct urb *urb,
/* If the URB is the first of its payload, decode and save the
* header.
*/
if (video->bulk.header_size == 0) {
if (video->bulk.header_size == 0 && !video->bulk.skip_payload) {
do {
ret = uvc_video_decode_start(video, buf, mem, len);
if (ret == -EAGAIN)
Expand All @@ -522,14 +522,13 @@ static void uvc_video_decode_bulk(struct urb *urb,
/* If an error occured skip the rest of the payload. */
if (ret < 0 || buf == NULL) {
video->bulk.skip_payload = 1;
return;
}
} else {
memcpy(video->bulk.header, mem, ret);
video->bulk.header_size = ret;

video->bulk.header_size = ret;
memcpy(video->bulk.header, mem, video->bulk.header_size);

mem += ret;
len -= ret;
mem += ret;
len -= ret;
}
}

/* The buffer queue might have been cancelled while a bulk transfer
Expand Down

0 comments on commit 7ca1a31

Please sign in to comment.