diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-10-16 20:30:14 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-16 20:30:14 +0000 |
commit | 1f631450fd177e49141845db0989e4760689d3e5 (patch) | |
tree | 1add659baa3e994e85a35762584db0cf39e4eb91 | |
parent | ad81a9fe41bb3519df26ee2a2784f71176fbc3c4 (diff) | |
download | ffmpeg-1f631450fd177e49141845db0989e4760689d3e5.tar.gz |
OPT_FLOAT
Originally committed as revision 3601 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | cmdutils.c | 2 | ||||
-rw-r--r-- | cmdutils.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/cmdutils.c b/cmdutils.c index 8aeaf0f2d4..171fcfc840 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -83,6 +83,8 @@ void parse_options(int argc, char **argv, const OptionDef *options) *po->u.int_arg = 1; } else if (po->flags & OPT_INT) { *po->u.int_arg = atoi(arg); + } else if (po->flags & OPT_FLOAT) { + *po->u.float_arg = atof(arg); } else { po->u.func_arg(arg); } diff --git a/cmdutils.h b/cmdutils.h index bd979eba29..4e566f3b02 100644 --- a/cmdutils.h +++ b/cmdutils.h @@ -12,10 +12,12 @@ typedef struct { #define OPT_AUDIO 0x0020 #define OPT_GRAB 0x0040 #define OPT_INT 0x0080 +#define OPT_FLOAT 0x0080 union { void (*func_arg)(const char *); int *int_arg; char **str_arg; + float *float_arg; } u; const char *help; const char *argname; |