Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114038
b: refs/heads/master
c: a3a5846
h: refs/heads/master
v: v3
  • Loading branch information
Frank Zago authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 3ae0851 commit 2ce8f5d
Show file tree
Hide file tree
Showing 2 changed files with 12 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: b1043e562ec9e5fe60af85b3a7eea43e77a35994
refs/heads/master: a3a58467db3c90a1e289970ef319c7abb90be617
21 changes: 11 additions & 10 deletions trunk/drivers/media/video/gspca/finepix.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ static void urb_callback(struct urb *urb)
struct gspca_frame *frame;

frame = gspca_get_i_frame(&dev->gspca_dev);
if (frame == NULL) {
if (frame == NULL)
gspca_dev->last_packet_type = DISCARD_PACKET;
break;
}
if (urb->actual_length < FPIX_MAX_TRANSFER ||
(data[urb->actual_length-2] == 0xff &&
data[urb->actual_length-1] == 0xd9)) {
Expand All @@ -149,18 +147,21 @@ static void urb_callback(struct urb *urb)
* but there's nothing we can do. We also end
* here if the the jpeg ends right at the end
* of the frame. */
gspca_frame_add(gspca_dev, LAST_PACKET,
frame,
data, urb->actual_length);
if (frame)
gspca_frame_add(gspca_dev, LAST_PACKET,
frame,
data, urb->actual_length);
dev_new_state(FPIX_REQ_FRAME);
schedule_delayed_work(&dev->wqe, NEXT_FRAME_DELAY);
} else {

/* got a partial image */
gspca_frame_add(gspca_dev,
gspca_dev->last_packet_type == LAST_PACKET
? FIRST_PACKET : INTER_PACKET,
frame,
if (frame)
gspca_frame_add(gspca_dev,
gspca_dev->last_packet_type
== LAST_PACKET
? FIRST_PACKET : INTER_PACKET,
frame,
data, urb->actual_length);
read_frame_part(dev);
}
Expand Down

0 comments on commit 2ce8f5d

Please sign in to comment.