aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/ov519.c
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2010-06-27 02:08:19 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:31:10 -0400
commitb192ca983746585e807259414f8d6f58cb28311f (patch)
tree8c95bdcebcf4217e3813d803ecf281af2d431e5f /drivers/media/video/gspca/ov519.c
parentc6dc725c8e0c3438587e18f918f6da16e7a23539 (diff)
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/ov519.c')
-rw-r--r--drivers/media/video/gspca/ov519.c6
1 files changed, 2 insertions, 4 deletions
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,
4162 int len) /* iso packet length */ 4162 int len) /* iso packet length */
4163{ 4163{
4164 struct sd *sd = (struct sd *) gspca_dev; 4164 struct sd *sd = (struct sd *) gspca_dev;
4165 struct gspca_frame *frame;
4166 4165
4167 gspca_frame_add(gspca_dev, INTER_PACKET, data, len); 4166 gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
4168 4167
@@ -4172,9 +4171,8 @@ static void ovfx2_pkt_scan(struct gspca_dev *gspca_dev,
4172 the sensor and bridge are still syncing, so drop it. */ 4171 the sensor and bridge are still syncing, so drop it. */
4173 if (sd->first_frame) { 4172 if (sd->first_frame) {
4174 sd->first_frame--; 4173 sd->first_frame--;
4175 frame = gspca_get_i_frame(gspca_dev); 4174 if (gspca_dev->image_len <
4176 if (!frame || (frame->data_end - frame->data) < 4175 sd->gspca_dev.width * sd->gspca_dev.height)
4177 (sd->gspca_dev.width * sd->gspca_dev.height))
4178 gspca_dev->last_packet_type = DISCARD_PACKET; 4176 gspca_dev->last_packet_type = DISCARD_PACKET;
4179 } 4177 }
4180 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); 4178 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);