noise_model.c: add missing input file check Fixes a clang-19 static analysis warnings of the form: ``` The 1st argument to 'fopen' is NULL but should not be NULL ``` Bug: 474642915 Change-Id: I81cc75876832b112a74b6b76c8a56e0136926f49
diff --git a/examples/noise_model.c b/examples/noise_model.c index e23185e..ac7f5f5 100644 --- a/examples/noise_model.c +++ b/examples/noise_model.c
@@ -304,6 +304,9 @@ info.time_base.numerator = args.fps.den; info.time_base.denominator = args.fps.num; + if (!args.input) { + die("No input file specified\n"); + } if (info.frame_width <= 0 || info.frame_height <= 0 || (info.frame_width % 2) != 0 || (info.frame_height % 2) != 0) { die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);