Skip to content

Commit

Permalink
apps: Output error message if no output name is given
Browse files Browse the repository at this point in the history
  • Loading branch information
philipnbbc committed Aug 30, 2024
1 parent 024a271 commit e2b99b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 5 additions & 0 deletions apps/bmxtranswrap/bmxtranswrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3568,6 +3568,11 @@ int main(int argc, const char** argv)
log_info("Output filename set to '%s'\n", complete_output_name.c_str());
}

if (complete_output_name.empty()) {
log_error("No output name given; use the '-o' option\n");
throw false;
}


// create output clip and initialize

Expand Down
11 changes: 5 additions & 6 deletions apps/raw2bmx/raw2bmx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4113,12 +4113,6 @@ int main(int argc, const char** argv)
return 1;
}

if (!output_name) {
usage_ref(argv[0]);
fprintf(stderr, "No output name given\n");
return 1;
}

if (inputs.empty()) {
usage_ref(argv[0]);
fprintf(stderr, "No raw inputs given\n");
Expand Down Expand Up @@ -4997,6 +4991,11 @@ int main(int argc, const char** argv)
log_info("Output filename set to '%s'\n", complete_output_name.c_str());
}

if (complete_output_name.empty()) {
log_error("No output name given; use the '-o' option\n");
throw false;
}


// create clip

Expand Down

0 comments on commit e2b99b5

Please sign in to comment.