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: ba8da0f2fc
("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>
This commit is contained in:
parent
a78e56ecc2
commit
2f516306a7
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue