summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/ov534.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-04-23 18:52:27 +0200
committerJean-Francois Moine <moinejf@free.fr>2009-04-23 18:52:27 +0200
commit44d5135c991fe67dafe83b30bbadddd586a63fe4 (patch)
tree8fad4a0c804fd1214dba07660c390483b94f1c7d /linux/drivers/media/video/gspca/ov534.c
parent27fcff0ad226c68320c8b72afff4a431d25d4462 (diff)
downloadmediapointer-dvb-s2-44d5135c991fe67dafe83b30bbadddd586a63fe4.tar.gz
mediapointer-dvb-s2-44d5135c991fe67dafe83b30bbadddd586a63fe4.tar.bz2
gspca - ov534: Don't discard the images when no UVC EOF.
From: Jean-Francois Moine <moinejf@free.fr> A new image may start without any UVC EOF in the last packet of the previous image. Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/ov534.c')
-rw-r--r--linux/drivers/media/video/gspca/ov534.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/linux/drivers/media/video/gspca/ov534.c b/linux/drivers/media/video/gspca/ov534.c
index abb8ea3db..1e00e46b1 100644
--- a/linux/drivers/media/video/gspca/ov534.c
+++ b/linux/drivers/media/video/gspca/ov534.c
@@ -890,18 +890,16 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
/* If PTS or FID has changed, start a new frame. */
if (this_pts != sd->last_pts || this_fid != sd->last_fid) {
- gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
- NULL, 0);
+ if (gspca_dev->last_packet_type == INTER_PACKET)
+ frame = gspca_frame_add(gspca_dev,
+ LAST_PACKET, frame,
+ NULL, 0);
sd->last_pts = this_pts;
sd->last_fid = this_fid;
- }
-
- /* Add the data from this payload */
- gspca_frame_add(gspca_dev, INTER_PACKET, frame,
+ gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
data + 12, len - 12);
-
/* If this packet is marked as EOF, end the frame */
- if (data[1] & UVC_STREAM_EOF) {
+ } else if (data[1] & UVC_STREAM_EOF) {
sd->last_pts = 0;
if (frame->data_end - frame->data !=
@@ -909,11 +907,16 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame,
PDEBUG(D_PACK, "short frame");
goto discard;
}
-
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
- NULL, 0);
+ data + 12, len - 12);
+ } else {
+
+ /* Add the data from this payload */
+ gspca_frame_add(gspca_dev, INTER_PACKET, frame,
+ data + 12, len - 12);
}
+
/* Done this payload */
goto scan_next;