diff mbox

ov534: fix end of frame handling, make the camera work again.

Message ID 1263678300-20313-1-git-send-email-ospite@studenti.unina.it (mailing list archive)
State Accepted
Headers show

Commit Message

Antonio Ospite Jan. 16, 2010, 9:45 p.m. UTC
None
diff mbox

Patch

Index: gspca/linux/drivers/media/video/gspca/ov534.c
===================================================================
--- gspca.orig/linux/drivers/media/video/gspca/ov534.c
+++ gspca/linux/drivers/media/video/gspca/ov534.c
@@ -992,9 +992,9 @@ 
 			frame = gspca_get_i_frame(gspca_dev);
 			if (frame == NULL)
 				goto discard;
-			if (frame->data_end - frame->data !=
+			if (frame->data_end - frame->data + (len - 12) !=
 			    gspca_dev->width * gspca_dev->height * 2) {
-				PDEBUG(D_PACK, "short frame");
+				PDEBUG(D_PACK, "wrong sized frame");
 				goto discard;
 			}
 			gspca_frame_add(gspca_dev, LAST_PACKET,