Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124378
b: refs/heads/master
c: 8c25205
h: refs/heads/master
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent 0115b37 commit da96b11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: fb139224aea3b56237542690516eb9d6d671b135
refs/heads/master: 8c252050146fc6f54e9bf5ef8276b25f3dd67a1c
13 changes: 7 additions & 6 deletions trunk/drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ static int frame_rate;
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
__u32 last_fid;
__u32 last_pts;
};

/* V4L2 controls supported by the driver */
Expand Down Expand Up @@ -397,9 +399,8 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
__u8 *data, int len)
{
static __u32 last_pts;
struct sd *sd = (struct sd *) gspca_dev;
__u32 this_pts;
static int last_fid;
int this_fid;

/* Payloads are prefixed with a the UVC-style header. We
Expand Down Expand Up @@ -428,10 +429,10 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
this_fid = (data[1] & UVC_STREAM_FID) ? 1 : 0;

/* If PTS or FID has changed, start a new frame. */
if (this_pts != last_pts || this_fid != last_fid) {
if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
last_pts = this_pts;
last_fid = this_fid;
sd->last_pts = this_pts;
sd->last_fid = this_fid;
}

/* Add the data from this payload */
Expand All @@ -440,7 +441,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,

/* If this packet is marked as EOF, end the frame */
if (data[1] & UVC_STREAM_EOF) {
last_pts = 0;
sd->last_pts = 0;

if ((frame->data_end - frame->data) !=
(gspca_dev->width * gspca_dev->height * 2)) {
Expand Down

0 comments on commit da96b11

Please sign in to comment.