Commit 81c10f5db0 for aom
commit 81c10f5db0a629f5ab17b3cd0a18bb9beabb67e0
Author: James Zern <jzern@google.com>
Date: Thu Jun 18 15:02:06 2026 -0700
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 e23185e7c1..ac7f5f56cc 100644
--- a/examples/noise_model.c
+++ b/examples/noise_model.c
@@ -304,6 +304,9 @@ int main(int argc, char *argv[]) {
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);