From 77bd1bc73a1946b0f0ce09a7cbb242a65e138d06 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 8 Jun 2012 21:35:16 +0200 Subject: avconv: use new options parser. --- avconv.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'avconv.c') diff --git a/avconv.c b/avconv.c index 444e74d8d9..dd998ab40c 100644 --- a/avconv.c +++ b/avconv.c @@ -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(); -- cgit v1.2.3