Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201950
b: refs/heads/master
c: d6b6d7a
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Aug 2, 2010
1 parent 683ec2d commit d43146f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 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: ccfb30288228aaaf40a849bffe434bc9eb46b23c
refs/heads/master: d6b6d7aef458e1c1ce6997929d38aaa48fe637c2
21 changes: 18 additions & 3 deletions trunk/drivers/media/video/gspca/ov519.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ struct sd {
#define QUALITY_DEF 50

__u8 stopped; /* Streaming is temporarily paused */
__u8 first_frame;

__u8 frame_rate; /* current Framerate */
__u8 clockdiv; /* clockdiv override */
Expand Down Expand Up @@ -3961,6 +3962,8 @@ static int sd_start(struct gspca_dev *gspca_dev)
sd_reset_snapshot(gspca_dev);
sd->snapshot_pressed = 0;

sd->first_frame = 3;

ret = ov51x_restart(sd);
if (ret < 0)
goto out;
Expand Down Expand Up @@ -4153,13 +4156,25 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev,
u8 *data, /* isoc packet */
int len) /* iso packet length */
{
struct sd *sd = (struct sd *) gspca_dev;
struct gspca_frame *frame;

gspca_frame_add(gspca_dev, INTER_PACKET, data, len);

/* A short read signals EOF */
if (len < OVFX2_BULK_SIZE) {
gspca_frame_add(gspca_dev, LAST_PACKET, data, len);
/* If the frame is short, and it is one of the first ones
the sensor and bridge are still syncing, so drop it. */
if (sd->first_frame) {
sd->first_frame--;
frame = gspca_get_i_frame(gspca_dev);
if (!frame || (frame->data_end - frame->data) <
(sd->gspca_dev.width * sd->gspca_dev.height))
gspca_dev->last_packet_type = DISCARD_PACKET;
}
gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);
gspca_frame_add(gspca_dev, FIRST_PACKET, NULL, 0);
return;
}
gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
}

static void sd_pkt_scan(struct gspca_dev *gspca_dev,
Expand Down

0 comments on commit d43146f

Please sign in to comment.