libcamera: v4l2_device: Set bytesperline in single plane S_FMT

The 'bytesperline' field of 'struct v4l2_pix_format' has to be set for
the single planar set format use case.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2019-02-01 10:11:33 +01:00
parent f8c0c5817e
commit acae9a9fd2

View file

@ -331,6 +331,7 @@ int V4L2Device::setFormatSingleplane(V4L2DeviceFormat *format)
pix->width = format->width;
pix->height = format->height;
pix->pixelformat = format->fourcc;
pix->bytesperline = format->planes[0].bpl;
ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Format);
if (ret) {