mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-31 17:07:43 +00:00
Make cmdutils.c:parse_options accept as argument a function to parse
bare command line parameters. patch by Stefano Sabatini, stefano.sabatini-lala poste it Originally committed as revision 10112 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
9c0edaaf13
commit
60a9966e4d
4 changed files with 18 additions and 11 deletions
|
@ -61,7 +61,8 @@ static const OptionDef* find_option(const OptionDef *po, const char *name){
|
|||
return po;
|
||||
}
|
||||
|
||||
void parse_options(int argc, char **argv, const OptionDef *options)
|
||||
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||
void (* parse_arg_function)(const char*))
|
||||
{
|
||||
const char *opt, *arg;
|
||||
int optindex, handleoptions=1;
|
||||
|
@ -112,7 +113,8 @@ unknown_opt:
|
|||
po->u.func_arg(arg);
|
||||
}
|
||||
} else {
|
||||
parse_arg_file(opt);
|
||||
if (parse_arg_function)
|
||||
parse_arg_function(opt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue