Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232749
b: refs/heads/master
c: a5ecdfb
h: refs/heads/master
i:
  232747: 741f28a
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Jan 31, 2011
1 parent 9c06eb6 commit 5aecca8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 3d244065cb8764e23fe86225fb985e5deb3b26d5
refs/heads/master: a5ecdfb3dab0ed55ca72fb5ad73657baf2af2fa0
12 changes: 10 additions & 2 deletions trunk/drivers/media/video/gspca/zc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -6821,9 +6821,17 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
{
struct sd *sd = (struct sd *) gspca_dev;

if (data[0] == 0xff && data[1] == 0xd8) { /* start of frame */
/* check the JPEG end of frame */
if (len >= 3
&& data[len - 3] == 0xff && data[len - 2] == 0xd9) {
/*fixme: what does the last byte mean?*/
gspca_frame_add(gspca_dev, LAST_PACKET,
NULL, 0);
data, len - 1);
return;
}

/* check the JPEG start of a frame */
if (data[0] == 0xff && data[1] == 0xd8) {
/* put the JPEG header in the new frame */
gspca_frame_add(gspca_dev, FIRST_PACKET,
sd->jpeg_hdr, JPEG_HDR_SZ);
Expand Down

0 comments on commit 5aecca8

Please sign in to comment.