[SCM] libav/experimental: Print usage instead of help when no files are specified.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:56:17 UTC 2013
The following commit has been merged in the experimental branch:
commit 7f11e745b27bfbac6b2a18daffc44173530bd6d5
Author: Ramiro Polla <ramiro.polla at gmail.com>
Date: Mon Dec 21 02:15:46 2009 +0000
Print usage instead of help when no files are specified.
Originally committed as revision 20905 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/ffmpeg.c b/ffmpeg.c
index 19e4405..3158068 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3995,8 +3995,11 @@ int main(int argc, char **argv)
/* parse options */
parse_options(argc, argv, options, opt_output_file);
- if(nb_output_files <= 0 && nb_input_files == 0)
- show_help();
+ if(nb_output_files <= 0 && nb_input_files == 0) {
+ show_usage();
+ fprintf(stderr, "Use -h to get full help or, even better, run 'man ffmpeg'\n");
+ av_exit(1);
+ }
/* file converter / grab */
if (nb_output_files <= 0) {
diff --git a/ffplay.c b/ffplay.c
index a254203..df9958e 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2546,8 +2546,9 @@ int main(int argc, char **argv)
parse_options(argc, argv, options, opt_input_file);
if (!input_filename) {
- show_help();
+ show_usage();
fprintf(stderr, "An input file must be specified\n");
+ fprintf(stderr, "Use -h to get full help or, even better, run 'man ffplay'\n");
exit(1);
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list