aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-08-29 08:11:03 +0200
committerAnton Khirnov <anton@khirnov.net>2011-09-04 13:12:00 +0200
commit2f8e586df14649ebf1538dc610928c844e0068ec (patch)
tree1abb4b28db2fe8283167209a74fddd923bb4ffd1 /cmdutils.h
parent7cc8d6385aaf1005700305f21d5d56b51b38c537 (diff)
downloadffmpeg-2f8e586df14649ebf1538dc610928c844e0068ec.tar.gz
cmdutils: split per-option code out of parse_options().
This allows options like -target, which are just shortcuts for other options, to work without dummy function for all options they invoke.
Diffstat (limited to 'cmdutils.h')
-rw-r--r--cmdutils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmdutils.h b/cmdutils.h
index a4716cad61..f0c9079647 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -152,6 +152,13 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options
void (* parse_arg_function)(void *optctx, const char*));
/**
+ * Parse one given option.
+ *
+ * @return on success 1 if arg was consumed, 0 otherwise; negative number on error
+ */
+int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options);
+
+/**
* Check if the given stream matches a stream specifier.
*
* @param s Corresponding format context.