summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-02-01 10:11:33 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-02-03 12:18:02 +0100
commitacae9a9fd2fa04c77d3c131696ec5a7e0b6a66db (patch)
tree1aae33580fc3f2bced03e6ae47e363026cdb120f
parentf8c0c5817ee43a8d0a30e13fcd1f2e20ec746f0d (diff)
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>
-rw-r--r--src/libcamera/v4l2_device.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp
index b86a6295..4d1f76be 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) {