提交 c90e7779 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

V4L/DVB (10651): uvcvideo: Ignore empty bulk URBs

Devices may send a zero-length packet to signal the end of a bulk payload. If
the payload size is a multiple of the URB size the zero-length packet will be
received by the URB completion handler. Handle this by ignoring all empty URBs.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 72362422
......@@ -540,6 +540,9 @@ static void uvc_video_decode_bulk(struct urb *urb,
u8 *mem;
int len, ret;
if (urb->actual_length == 0)
return;
mem = urb->transfer_buffer;
len = urb->actual_length;
video->bulk.payload_size += len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册