Commit c99f6dc3 authored by michael's avatar michael

OPT_FLOAT


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3601 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 58613106
...@@ -83,6 +83,8 @@ void parse_options(int argc, char **argv, const OptionDef *options) ...@@ -83,6 +83,8 @@ void parse_options(int argc, char **argv, const OptionDef *options)
*po->u.int_arg = 1; *po->u.int_arg = 1;
} else if (po->flags & OPT_INT) { } else if (po->flags & OPT_INT) {
*po->u.int_arg = atoi(arg); *po->u.int_arg = atoi(arg);
} else if (po->flags & OPT_FLOAT) {
*po->u.float_arg = atof(arg);
} else { } else {
po->u.func_arg(arg); po->u.func_arg(arg);
} }
......
...@@ -12,10 +12,12 @@ typedef struct { ...@@ -12,10 +12,12 @@ typedef struct {
#define OPT_AUDIO 0x0020 #define OPT_AUDIO 0x0020
#define OPT_GRAB 0x0040 #define OPT_GRAB 0x0040
#define OPT_INT 0x0080 #define OPT_INT 0x0080
#define OPT_FLOAT 0x0080
union { union {
void (*func_arg)(const char *); void (*func_arg)(const char *);
int *int_arg; int *int_arg;
char **str_arg; char **str_arg;
float *float_arg;
} u; } u;
const char *help; const char *help;
const char *argname; const char *argname;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment