From d2c689d834f3c29dd15a07d5d421fe6c3124880e Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Thu, 11 Dec 2008 09:02:18 +0100 Subject: gspca - vc032x: Fix frame overflow errors with vc0321. From: Hans de Goede The vc0321 sends some additional data after sending the complete frame, we ignore this. Priority: normal Signed-off-by: Hans de Goede Signed-off-by: Jean-Francois Moine --- linux/drivers/media/video/gspca/vc032x.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'linux') diff --git a/linux/drivers/media/video/gspca/vc032x.c b/linux/drivers/media/video/gspca/vc032x.c index 15dc660a5..fb05d866f 100644 --- a/linux/drivers/media/video/gspca/vc032x.c +++ b/linux/drivers/media/video/gspca/vc032x.c @@ -2291,6 +2291,12 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, data, len); return; } + + /* The vc0321 sends some additional data after sending the complete + * frame, we ignore this. */ + if (sd->bridge == BRIDGE_VC0321 + && len > frame->v4l2_buf.length - (frame->data_end - frame->data)) + len = frame->v4l2_buf.length - (frame->data_end - frame->data); gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); } -- cgit v1.2.3