Skip to content

Commit

Permalink
V4L/DVB: gspca - ov534: Fix end of frame handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 29b87f0 commit 11edebc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 11edebc

Please sign in to comment.