summaryrefslogtreecommitdiff
path: root/src/libcamera/v4l2_videodevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcamera/v4l2_videodevice.cpp')
-rw-r--r--src/libcamera/v4l2_videodevice.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp
index 84ccb974..1c4e6fbf 100644
--- a/src/libcamera/v4l2_videodevice.cpp
+++ b/src/libcamera/v4l2_videodevice.cpp
@@ -1337,11 +1337,7 @@ std::unique_ptr<FrameBuffer> V4L2VideoDevice::createBuffer(unsigned int index)
planes[i].offset = offset;
/* \todo Take the V4L2 stride into account */
- const unsigned int vertSubSample =
- info.planes[i].verticalSubSampling;
- planes[i].length =
- info.stride(format_.size.width, i, 1u) *
- ((format_.size.height + vertSubSample - 1) / vertSubSample);
+ planes[i].length = info.planeSize(format_.size, i);
offset += planes[i].length;
}
}