mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-15 03:34:56 +00:00
Show help if no cmd line options are provided at all.
This safes the users time to find out which of -h --help -? works. Originally committed as revision 20822 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0dae3e13e3
commit
e4637d6a60
3
ffmpeg.c
3
ffmpeg.c
@ -3985,6 +3985,9 @@ int main(int argc, char **argv)
|
|||||||
/* parse options */
|
/* parse options */
|
||||||
parse_options(argc, argv, options, opt_output_file);
|
parse_options(argc, argv, options, opt_output_file);
|
||||||
|
|
||||||
|
if(nb_output_files <= 0 && nb_input_files == 0)
|
||||||
|
show_help();
|
||||||
|
|
||||||
/* file converter / grab */
|
/* file converter / grab */
|
||||||
if (nb_output_files <= 0) {
|
if (nb_output_files <= 0) {
|
||||||
fprintf(stderr, "At least one output file must be specified\n");
|
fprintf(stderr, "At least one output file must be specified\n");
|
||||||
|
1
ffplay.c
1
ffplay.c
@ -2539,6 +2539,7 @@ int main(int argc, char **argv)
|
|||||||
parse_options(argc, argv, options, opt_input_file);
|
parse_options(argc, argv, options, opt_input_file);
|
||||||
|
|
||||||
if (!input_filename) {
|
if (!input_filename) {
|
||||||
|
show_help();
|
||||||
fprintf(stderr, "An input file must be specified\n");
|
fprintf(stderr, "An input file must be specified\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user