diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-04-30 17:41:48 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-04-30 17:41:48 +0400 |
commit | 26d4f26bb72622a5f8336f763bae75e97eb9217d (patch) | |
tree | 41bb623e10dd8f1b9710549f93d9e0a06b2e1a50 | |
parent | 242f5b0a880713463d206c59c78ea8593dc90965 (diff) |
OPT_INT
Originally committed as revision 3092 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | cmdutils.c | 2 | ||||
-rw-r--r-- | cmdutils.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 309b99f7a6..8aeaf0f2d4 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -81,6 +81,8 @@ void parse_options(int argc, char **argv, const OptionDef *options) *po->u.str_arg = str; } else if (po->flags & OPT_BOOL) { *po->u.int_arg = 1; + } else if (po->flags & OPT_INT) { + *po->u.int_arg = atoi(arg); } else { po->u.func_arg(arg); } diff --git a/cmdutils.h b/cmdutils.h index a8913f385d..bd979eba29 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -11,6 +11,7 @@ typedef struct { #define OPT_VIDEO 0x0010 #define OPT_AUDIO 0x0020 #define OPT_GRAB 0x0040 +#define OPT_INT 0x0080 union { void (*func_arg)(const char *); int *int_arg; |