From f1776100f55e70320a8938586bc8bf2f242addd4 Mon Sep 17 00:00:00 2001 From: Daniel Semkowicz Date: Mon, 27 Jun 2022 14:28:06 +0200 Subject: 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 Reviewed-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Jacopo Mondi --- src/cam/capture_script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.1