Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201964
b: refs/heads/master
c: ebb78c5
h: refs/heads/master
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Aug 2, 2010
1 parent 215c62d commit d3ddfb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 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: 983882411b1121557c822887a27aeaa874f51577
refs/heads/master: ebb78c5a81e0f4c85f6d9e1b0d11ede7adb530b3
25 changes: 8 additions & 17 deletions trunk/drivers/media/video/gspca/t613.c
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* isoc packet */
int len) /* iso packet length */
{
static u8 ffd9[] = { 0xff, 0xd9 };
int pkt_type;

if (data[0] == 0x5a) {
/* Control Packet, after this came the header again,
Expand All @@ -1090,22 +1090,13 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
}
data += 2;
len -= 2;
if (data[0] == 0xff && data[1] == 0xd8) {
/* extra bytes....., could be processed too but would be
* a waste of time, right now leave the application and
* libjpeg do it for ourserlves.. */
gspca_frame_add(gspca_dev, LAST_PACKET,
ffd9, 2);
gspca_frame_add(gspca_dev, FIRST_PACKET, data, len);
return;
}

if (data[len - 2] == 0xff && data[len - 1] == 0xd9) {
/* Just in case, i have seen packets with the marker,
* other's do not include it... */
len -= 2;
}
gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
if (data[0] == 0xff && data[1] == 0xd8)
pkt_type = FIRST_PACKET;
else if (data[len - 2] == 0xff && data[len - 1] == 0xd9)
pkt_type = LAST_PACKET;
else
pkt_type = INTER_PACKET;
gspca_frame_add(gspca_dev, pkt_type, data, len);
}


Expand Down

0 comments on commit d3ddfb1

Please sign in to comment.