diff options
author | Antonio Ospite <ospite@studenti.unina.it> | 2010-01-17 03:42:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:10:47 -0300 |
commit | 11edebc264f14d3f9e05525f238b91da7f5fa81f (patch) | |
tree | 7a680b4c02478b41d4b4e162f2433475b728f4bb /drivers/media/video/gspca | |
parent | 29b87f045552910f964972b7a45e9be054401a0b (diff) |
V4L/DVB: gspca - ov534: Fix end of frame handling
Fix a regression, introduced in the driver split, which made
the ov534 driver unusable.
Plus, the debug message should reflect that we discard also packets
beyond the expected frame size.
Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r-- | drivers/media/video/gspca/ov534.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index c02784bbe95..957e05e2d08 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c @@ -992,9 +992,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, 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, |