mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
OPT_INT
Originally committed as revision 3092 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
242f5b0a88
commit
26d4f26bb7
@ -81,6 +81,8 @@ void parse_options(int argc, char **argv, const OptionDef *options)
|
|||||||
*po->u.str_arg = str;
|
*po->u.str_arg = str;
|
||||||
} else if (po->flags & OPT_BOOL) {
|
} else if (po->flags & OPT_BOOL) {
|
||||||
*po->u.int_arg = 1;
|
*po->u.int_arg = 1;
|
||||||
|
} else if (po->flags & OPT_INT) {
|
||||||
|
*po->u.int_arg = atoi(arg);
|
||||||
} else {
|
} else {
|
||||||
po->u.func_arg(arg);
|
po->u.func_arg(arg);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ typedef struct {
|
|||||||
#define OPT_VIDEO 0x0010
|
#define OPT_VIDEO 0x0010
|
||||||
#define OPT_AUDIO 0x0020
|
#define OPT_AUDIO 0x0020
|
||||||
#define OPT_GRAB 0x0040
|
#define OPT_GRAB 0x0040
|
||||||
|
#define OPT_INT 0x0080
|
||||||
union {
|
union {
|
||||||
void (*func_arg)(const char *);
|
void (*func_arg)(const char *);
|
||||||
int *int_arg;
|
int *int_arg;
|
||||||
|
Loading…
Reference in New Issue
Block a user