[media] v4l2: uvcvideo: Allow using larger buffers
A test in uvc_video_decode_isoc() checks whether an image has been received from the camera completely. For this the data amount is compared to the buffer length, which, however, doesn't have to be equal to the image size. Switch to using formats .sizeimage field for an exact expected image size. [Renamed image_size to frame_size] Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
720b055d4b
commit
e93e7fd9f5
@@ -318,6 +318,7 @@ static int uvc_v4l2_set_format(struct uvc_streaming *stream,
|
||||
stream->ctrl = probe;
|
||||
stream->cur_format = format;
|
||||
stream->cur_frame = frame;
|
||||
stream->frame_size = fmt->fmt.pix.sizeimage;
|
||||
|
||||
done:
|
||||
mutex_unlock(&stream->mutex);
|
||||
|
Reference in New Issue
Block a user