提交 11edebc2 编写于 作者: A Antonio Ospite 提交者: Mauro Carvalho Chehab

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: NAntonio Ospite <ospite@studenti.unina.it>
Signed-off-by: NJean-Francois Moine <moinejf@free.fr>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 29b87f04
...@@ -992,9 +992,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev, ...@@ -992,9 +992,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
frame = gspca_get_i_frame(gspca_dev); frame = gspca_get_i_frame(gspca_dev);
if (frame == NULL) if (frame == NULL)
goto discard; goto discard;
if (frame->data_end - frame->data != if (frame->data_end - frame->data + (len - 12) !=
gspca_dev->width * gspca_dev->height * 2) { gspca_dev->width * gspca_dev->height * 2) {
PDEBUG(D_PACK, "short frame"); PDEBUG(D_PACK, "wrong sized frame");
goto discard; goto discard;
} }
gspca_frame_add(gspca_dev, LAST_PACKET, gspca_frame_add(gspca_dev, LAST_PACKET,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册