diff options
Diffstat (limited to 'drivers/media/video/gspca/ov534.c')
-rw-r--r-- | drivers/media/video/gspca/ov534.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index 26d98b1312e0..193129a59ab7 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c | |||
@@ -1403,8 +1403,8 @@ static void sd_stopN_ov965x(struct gspca_dev *gspca_dev) | |||
1403 | #define UVC_STREAM_EOF (1 << 1) | 1403 | #define UVC_STREAM_EOF (1 << 1) |
1404 | #define UVC_STREAM_FID (1 << 0) | 1404 | #define UVC_STREAM_FID (1 << 0) |
1405 | 1405 | ||
1406 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame, | 1406 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
1407 | __u8 *data, int len) | 1407 | u8 *data, int len) |
1408 | { | 1408 | { |
1409 | struct sd *sd = (struct sd *) gspca_dev; | 1409 | struct sd *sd = (struct sd *) gspca_dev; |
1410 | __u32 this_pts; | 1410 | __u32 this_pts; |
@@ -1445,23 +1445,22 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame, | |||
1445 | /* If PTS or FID has changed, start a new frame. */ | 1445 | /* If PTS or FID has changed, start a new frame. */ |
1446 | if (this_pts != sd->last_pts || this_fid != sd->last_fid) { | 1446 | if (this_pts != sd->last_pts || this_fid != sd->last_fid) { |
1447 | if (gspca_dev->last_packet_type == INTER_PACKET) | 1447 | if (gspca_dev->last_packet_type == INTER_PACKET) |
1448 | frame = gspca_frame_add(gspca_dev, | 1448 | gspca_frame_add(gspca_dev, LAST_PACKET, |
1449 | LAST_PACKET, frame, | 1449 | NULL, 0); |
1450 | NULL, 0); | ||
1451 | sd->last_pts = this_pts; | 1450 | sd->last_pts = this_pts; |
1452 | sd->last_fid = this_fid; | 1451 | sd->last_fid = this_fid; |
1453 | gspca_frame_add(gspca_dev, FIRST_PACKET, frame, | 1452 | gspca_frame_add(gspca_dev, FIRST_PACKET, |
1454 | data + 12, len - 12); | 1453 | data + 12, len - 12); |
1455 | /* If this packet is marked as EOF, end the frame */ | 1454 | /* If this packet is marked as EOF, end the frame */ |
1456 | } else if (data[1] & UVC_STREAM_EOF) { | 1455 | } else if (data[1] & UVC_STREAM_EOF) { |
1457 | sd->last_pts = 0; | 1456 | sd->last_pts = 0; |
1458 | frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, | 1457 | gspca_frame_add(gspca_dev, LAST_PACKET, |
1459 | data + 12, len - 12); | 1458 | data + 12, len - 12); |
1460 | } else { | 1459 | } else { |
1461 | 1460 | ||
1462 | /* Add the data from this payload */ | 1461 | /* Add the data from this payload */ |
1463 | gspca_frame_add(gspca_dev, INTER_PACKET, frame, | 1462 | gspca_frame_add(gspca_dev, INTER_PACKET, |
1464 | data + 12, len - 12); | 1463 | data + 12, len - 12); |
1465 | } | 1464 | } |
1466 | 1465 | ||
1467 | /* Done this payload */ | 1466 | /* Done this payload */ |
@@ -1469,7 +1468,7 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame, | |||
1469 | 1468 | ||
1470 | discard: | 1469 | discard: |
1471 | /* Discard data until a new frame starts. */ | 1470 | /* Discard data until a new frame starts. */ |
1472 | gspca_frame_add(gspca_dev, DISCARD_PACKET, frame, NULL, 0); | 1471 | gspca_dev->last_packet_type = DISCARD_PACKET; |
1473 | 1472 | ||
1474 | scan_next: | 1473 | scan_next: |
1475 | remaining_len -= len; | 1474 | remaining_len -= len; |