summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/mr97310a.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-13 20:17:47 -0300
commit675d7080a5676f235b39a78a0af9d6a32b589133 (patch)
treefff786e9e33cd9c182e22f8bb8c67a92fb3ad63e /linux/drivers/media/video/gspca/mr97310a.c
parent3e0273a7209d6a20bd422beec8b46dd6b79a00a7 (diff)
parenteb97af7a1c842f6958f57fe8f9dbd93471d17948 (diff)
downloadmediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.gz
mediapointer-dvb-s2-675d7080a5676f235b39a78a0af9d6a32b589133.tar.bz2
merge: http://linuxtv.org/hg/~gliakhovetski/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/mr97310a.c')
-rw-r--r--linux/drivers/media/video/gspca/mr97310a.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/linux/drivers/media/video/gspca/mr97310a.c b/linux/drivers/media/video/gspca/mr97310a.c
index 5ec5ce6e3..2a901a4a6 100644
--- a/linux/drivers/media/video/gspca/mr97310a.c
+++ b/linux/drivers/media/video/gspca/mr97310a.c
@@ -29,9 +29,7 @@ MODULE_LICENSE("GPL");
/* specific webcam descriptor */
struct sd {
struct gspca_dev gspca_dev; /* !! must be the first item */
-
u8 sof_read;
- u8 header_read;
};
/* V4L2 controls supported by the driver */
@@ -285,7 +283,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
__u8 *data, /* isoc packet */
int len) /* iso packet length */
{
- struct sd *sd = (struct sd *) gspca_dev;
unsigned char *sof;
sof = pac_find_sof(gspca_dev, data, len);
@@ -300,25 +297,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
n = 0;
frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
data, n);
- sd->header_read = 0;
- gspca_frame_add(gspca_dev, FIRST_PACKET, frame, NULL, 0);
+ /* Start next frame. */
+ gspca_frame_add(gspca_dev, FIRST_PACKET, frame,
+ pac_sof_marker, sizeof pac_sof_marker);
len -= sof - data;
data = sof;
}
- if (sd->header_read < 7) {
- int needed;
-
- /* skip the rest of the header */
- needed = 7 - sd->header_read;
- if (len <= needed) {
- sd->header_read += len;
- return;
- }
- data += needed;
- len -= needed;
- sd->header_read = 7;
- }
-
gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
}