From b192ca983746585e807259414f8d6f58cb28311f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Moine?= Date: Sun, 27 Jun 2010 03:08:19 -0300 Subject: V4L/DVB: gspca - main: Simplify image building MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/gspca/ov519.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/media/video/gspca/ov519.c') diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 2e7df66a84b9..2b2cbdbf03fe 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c @@ -4162,7 +4162,6 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev, int len) /* iso packet length */ { struct sd *sd = (struct sd *) gspca_dev; - struct gspca_frame *frame; gspca_frame_add(gspca_dev, INTER_PACKET, data, len); @@ -4172,9 +4171,8 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev, the sensor and bridge are still syncing, so drop it. */ if (sd->first_frame) { sd->first_frame--; - frame = gspca_get_i_frame(gspca_dev); - if (!frame || (frame->data_end - frame->data) < - (sd->gspca_dev.width * sd->gspca_dev.height)) + if (gspca_dev->image_len < + sd->gspca_dev.width * sd->gspca_dev.height) gspca_dev->last_packet_type = DISCARD_PACKET; } gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); -- cgit v1.2.1