summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Semkowicz <dse@thaumatec.com>2022-06-27 14:28:06 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-09-02 12:39:48 +0200
commitf1776100f55e70320a8938586bc8bf2f242addd4 (patch)
treebd55e95a7962744f43c9ceb442b710d9fcc3c42b
parentf71c76ceff7ad13490fd77800059ab2bd2a61498 (diff)
cam: capture_script: Check parseFrames() return value for errors
parseFrames() return value was ignored. If there was an error during frame parsing, parsing was not stopped correctly. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/cam/capture_script.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cam/capture_script.cpp b/src/cam/capture_script.cpp
index a8304433..5e85b3ca 100644
--- a/src/cam/capture_script.cpp
+++ b/src/cam/capture_script.cpp
@@ -150,7 +150,9 @@ int CaptureScript::parseScript(FILE *script)
std::string section = eventScalarValue(event);
if (section == "frames") {
- parseFrames();
+ ret = parseFrames();
+ if (ret)
+ return ret;
} else {
std::cerr << "Unsupported section '" << section << "'"
<< std::endl;