summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/ov534.c
diff options
context:
space:
mode:
authorJean-François Moine2010-06-27 08:08:19 +0200
committerMauro Carvalho Chehab2010-08-02 20:31:10 +0200
commitb192ca983746585e807259414f8d6f58cb28311f (patch)
tree8c95bdcebcf4217e3813d803ecf281af2d431e5f /drivers/media/video/gspca/ov534.c
parentV4L/DVB: gspca - gl860: Fix a compilation warning (diff)
downloadkernel-qcow2-linux-b192ca983746585e807259414f8d6f58cb28311f.tar.gz
kernel-qcow2-linux-b192ca983746585e807259414f8d6f58cb28311f.tar.xz
kernel-qcow2-linux-b192ca983746585e807259414f8d6f58cb28311f.zip
V4L/DVB: gspca - main: Simplify image building
The image pointer and its length are now in the main structure instead of in the frame buffer. They are updated on application vidioc_qbuf and in the URB interrupt function when ending an image. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/ov534.c')
-rw-r--r--drivers/media/video/gspca/ov534.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c
index dc1e4efe30fb..84c9b8dbded6 100644
--- a/drivers/media/video/gspca/ov534.c
+++ b/drivers/media/video/gspca/ov534.c
@@ -987,13 +987,10 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
data + 12, len - 12);
/* If this packet is marked as EOF, end the frame */
} else if (data[1] & UVC_STREAM_EOF) {
- struct gspca_frame *frame;
-
sd->last_pts = 0;
- frame = gspca_get_i_frame(gspca_dev);
- if (frame == NULL)
+ if (gspca_dev->image == NULL)
goto discard;
- if (frame->data_end - frame->data + (len - 12) !=
+ if (gspca_dev->image_len + len - 12 !=
gspca_dev->width * gspca_dev->height * 2) {
PDEBUG(D_PACK, "wrong sized frame");
goto discard;