diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2024-12-10 18:56:03 +0100 |
---|---|---|
committer | Barnabás Pőcze <pobrn@protonmail.com> | 2025-01-06 10:18:44 +0100 |
commit | fe33e727f278123e91ce5ebe75af08dec514cc5a (patch) | |
tree | eb87771ed8cb216698bdcce29e4ee6a046f141f8 | |
parent | 277a28691c08f46a0a80e61bd19436dde0fae004 (diff) |
libcamera: virtual: Query number of planes correctly
`PixelFormatInfo::planes.size()` always returns 3 since `planes` is
an array, but that is not the number of planes of the pixel format.
Use the `numPlanes()` getter instead.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/virtual/virtual.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/virtual/virtual.cpp b/src/libcamera/pipeline/virtual/virtual.cpp index 62e440ae..e692a543 100644 --- a/src/libcamera/pipeline/virtual/virtual.cpp +++ b/src/libcamera/pipeline/virtual/virtual.cpp @@ -278,7 +278,7 @@ int PipelineHandlerVirtual::exportFrameBuffers([[maybe_unused]] Camera *camera, const PixelFormatInfo &info = PixelFormatInfo::info(config.pixelFormat); std::vector<unsigned int> planeSizes; - for (size_t i = 0; i < info.planes.size(); ++i) + for (size_t i = 0; i < info.numPlanes(); ++i) planeSizes.push_back(info.planeSize(config.size, i)); return dmaBufAllocator_.exportBuffers(config.bufferCount, planeSizes, buffers); |