[libcamera-devel] [PATCH 6/7] libcamera: v4l2_device: Set bytesperline in single plane S_FMT
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri Feb 1 23:38:11 CET 2019
Hi Jacopo,
Thank you for the patch.
On Fri, Feb 01, 2019 at 04:42:47PM +0100, Jacopo Mondi wrote:
> The 'bytesperline' field of 'struct v4l2_pix_format' has to be set for
> the single planar set format use case.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/libcamera/v4l2_device.cpp | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
> index b86a629..4d1f76b 100644
> --- a/src/libcamera/v4l2_device.cpp
> +++ b/src/libcamera/v4l2_device.cpp
> @@ -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) {
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list