Message ID | 20190201154248.15006-7-jacopo@jmondi.org |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
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@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@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) {
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) {
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@jmondi.org> --- src/libcamera/v4l2_device.cpp | 1 + 1 file changed, 1 insertion(+)