Skip to content

Commit

Permalink
fix: do not crash if there are no input files
Browse files Browse the repository at this point in the history
  • Loading branch information
pprobst committed Mar 11, 2024
1 parent 48b96c3 commit 2a8992c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -956,11 +956,13 @@ int main(int argc, char ** argv) {
it++;
}

/*
if (params.fname_inp.empty()) {
fprintf(stderr, "error: no input files specified\n");
whisper_print_usage(argc, argv, params);
return 2;
}
*/

if (params.language != "auto" && whisper_lang_id(params.language.c_str()) == -1) {
fprintf(stderr, "error: unknown language '%s'\n", params.language.c_str());
Expand Down

0 comments on commit 2a8992c

Please sign in to comment.