Skip to content

Commit

Permalink
tiny_ssim: fix argc check
Browse files Browse the repository at this point in the history
The program requires a minimum of 2 parameters. Previously the tool
would crash if only one input file was given.

Bug: webm:365481206
Change-Id: I875d81b2db4fcc4338061c03b23bb51b0aad58e4
  • Loading branch information
jzern committed Sep 18, 2024
1 parent 696c488 commit 6dfdc4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/tiny_ssim.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ int main(int argc, char *argv[]) {

memset(in, 0, sizeof(in));

if (argc < 2) {
if (argc < 3) {
fprintf(stderr,
"Usage: %s file1.{yuv|y4m} file2.{yuv|y4m}"
"[WxH tl_skip={0,1,3} frame_stats_file bits]\n",
" [WxH tl_skip={0,1,3} frame_stats_file bits]\n",
argv[0]);
return 1;
}
Expand Down

0 comments on commit 6dfdc4e

Please sign in to comment.