summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMilan Zamazal <mzamazal@redhat.com>2025-01-24 22:57:52 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-01-27 00:05:32 +0200
commit818b7371465ebb96018cd10ee10db807d34fba68 (patch)
tree906debba23581407aa7bec35f860f94311ec64b7 /src
parentf5da05ed03eea8bf8911edb554c80f402a410c0f (diff)
libcamera: software_isp: Move a non-loop condition out of the loop
The check for the number of outputs is done in a loop over the outputs. It should be moved out of the loop as it's not loop specific and is just repeated there. This is a cosmetic change not changing any functionality. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/software_isp/software_isp.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp
index 2bea64d9..44baf200 100644
--- a/src/libcamera/software_isp/software_isp.cpp
+++ b/src/libcamera/software_isp/software_isp.cpp
@@ -291,11 +291,13 @@ int SoftwareIsp::queueBuffers(uint32_t frame, FrameBuffer *input,
if (outputs.empty())
return -EINVAL;
+ /* We only support a single stream for now. */
+ if (outputs.size() != 1)
+ return -EINVAL;
+
for (auto [stream, buffer] : outputs) {
if (!buffer)
return -EINVAL;
- if (outputs.size() != 1) /* only single stream atm */
- return -EINVAL;
}
for (auto iter = outputs.begin(); iter != outputs.end(); iter++)