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>
This commit is contained in:
Daniel Semkowicz 2022-06-27 14:28:06 +02:00 committed by Jacopo Mondi
parent f71c76ceff
commit f1776100f5

View file

@ -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;