From c661cb6672af5ebcb900ec8766b24761bd2ab011 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 19 Dec 2012 21:53:22 +0100 Subject: cmdutils: pass number of groups to split_commandline(). This makes the code simpler and avoids mixing designated and non-designated initializers in a potentially unsafe way in avconv. --- avconv_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'avconv_opt.c') diff --git a/avconv_opt.c b/avconv_opt.c index 6c7017572e..ce32df6b6b 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -1862,7 +1862,6 @@ enum OptGroup { static const OptionGroupDef groups[] = { [GROUP_OUTFILE] = { "output file", NULL }, [GROUP_INFILE] = { "input file", "i" }, - { 0 }, }; static int open_files(OptionGroupList *l, const char *inout, @@ -1907,7 +1906,8 @@ int avconv_parse_options(int argc, char **argv) memset(&octx, 0, sizeof(octx)); /* split the commandline into an internal representation */ - ret = split_commandline(&octx, argc, argv, options, groups); + ret = split_commandline(&octx, argc, argv, options, groups, + FF_ARRAY_ELEMS(groups)); if (ret < 0) { av_log(NULL, AV_LOG_FATAL, "Error splitting the argument list: "); goto fail; -- cgit v1.2.3