summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-01-31 17:28:04 +0100
committerJacopo Mondi <jacopo@jmondi.org>2019-02-03 12:14:46 +0100
commit2f516306a7b72f3f13c1648161e79ba8778351ae (patch)
tree03c900256800cbd6487714bf39d69f13742d4fad
parenta78e56ecc2f214696910aff782f44fd5f9628112 (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>
-rw-r--r--src/libcamera/v4l2_device.cpp2
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);