diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-01-31 17:28:04 +0100 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2019-02-03 12:14:46 +0100 |
commit | 2f516306a7b72f3f13c1648161e79ba8778351ae (patch) | |
tree | 03c900256800cbd6487714bf39d69f13742d4fad /src | |
parent | a78e56ecc2f214696910aff782f44fd5f9628112 (diff) |
libcamera: v4l2_device: Fix getFormatSingleplane ioctl
The single plane getFormat() function wrongly used the VIDIOC_S_FMT ioctl.
Fix that by using the more opportune VIDIOC_G_FMT one.
Fixes: ba8da0f2fcd0 ("libcamera: v4l2_device: Add methods to get/set format")
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/v4l2_device.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp index 26b6ff36..5ba89b90 100644 --- a/src/libcamera/v4l2_device.cpp +++ b/src/libcamera/v4l2_device.cpp @@ -305,7 +305,7 @@ int V4L2Device::getFormatSingleplane(V4L2DeviceFormat *fmt) int ret; v4l2Fmt.type = bufferType_; - ret = ioctl(fd_, VIDIOC_S_FMT, &v4l2Fmt); + ret = ioctl(fd_, VIDIOC_G_FMT, &v4l2Fmt); if (ret) { ret = -errno; LOG(Error) << "Unable to get format: " << strerror(-ret); |