qv4l2: Check and use result of read()
authorHans de Goede <hdegoede@redhat.com>
Fri, 31 Dec 2010 10:50:28 +0000 (11:50 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 31 Dec 2010 15:06:07 +0000 (16:06 +0100)
commitcc5e0cc9095d4cdcb77a20780af08f139140473b
tree46cbc7ae1832048473ebfed9521cf5875fb896f9
parent9e66659528c5aec7ca7bfd1ec881fe4a921e3c7c
qv4l2: Check and use result of read()

qv4l2 was calling libv4lconvert_convert with a src size of fmt.pix.sizeimage,
rather then using the actual amount of bytes read. This causes decompressors
which check if they have consumed the entire compressed frame (ie pjpg) to
error out, because they were not being passed the actual frame size.

This patch fixes this, and also adds reporting of libv4lconvert_convert
errors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
utils/qv4l2/qv4l2.cpp