avconv: use new options parser.

This commit is contained in:
Anton Khirnov
2012-06-08 21:35:16 +02:00
parent 0ec1642b60
commit 77bd1bc73a
3 changed files with 116 additions and 41 deletions

View File

@@ -2345,22 +2345,13 @@ static int64_t getmaxrss(void)
#endif
}
static void parse_cpuflags(int argc, char **argv, const OptionDef *options)
{
int idx = locate_option(argc, argv, options, "cpuflags");
if (idx && argv[idx + 1])
opt_cpuflags(NULL, "cpuflags", argv[idx + 1]);
}
int main(int argc, char **argv)
{
OptionsContext o = { 0 };
int ret;
int64_t ti;
atexit(exit_program);
reset_options(&o);
av_log_set_flags(AV_LOG_SKIP_REPEATED);
parse_loglevel(argc, argv, options);
@@ -2374,10 +2365,10 @@ int main(int argc, char **argv)
show_banner();
parse_cpuflags(argc, argv, options);
/* parse options */
parse_options(&o, argc, argv, options, opt_output_file);
/* parse options and open all input/output files */
ret = avconv_parse_options(argc, argv);
if (ret < 0)
exit(1);
if (nb_output_files <= 0 && nb_input_files == 0) {
show_usage();