mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-20 13:57:00 +00:00
OPT_FLOAT
Originally committed as revision 3601 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ad81a9fe41
commit
1f631450fd
@ -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 {
|
|||||||
#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;
|
||||||
|
Loading…
Reference in New Issue
Block a user