diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-04 23:54:19 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-05 13:21:02 +0200 |
commit | 96f931adf75967dc86fbf3ee21517e539d0a6e50 (patch) | |
tree | 83b2cb96c70525ef2801162e20fac07466ff45a7 /cmdutils.c | |
parent | 0d0fdb0ad59c0533fb91dad00379f762573ce541 (diff) | |
download | ffmpeg-96f931adf75967dc86fbf3ee21517e539d0a6e50.tar.gz |
cmdutils: change the signature of the function argument in parse_options()
This is required for a pending simplification.
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmdutils.c b/cmdutils.c index 2bc6b7417f..2bf4e03ac8 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -217,7 +217,7 @@ static inline void prepare_app_arguments(int *argc_ptr, char ***argv_ptr) #endif /* WIN32 && !__MINGW32CE__ */ void parse_options(int argc, char **argv, const OptionDef *options, - void (* parse_arg_function)(const char*)) + int (* parse_arg_function)(const char *opt, const char *arg)) { const char *opt, *arg; int optindex, handleoptions=1; @@ -284,8 +284,10 @@ unknown_opt: if(po->flags & OPT_EXIT) exit(0); } else { - if (parse_arg_function) - parse_arg_function(opt); + if (parse_arg_function) { + if (parse_arg_function(NULL, opt) < 0) + exit(1); + } } } } |