Commit ffdf9a1f authored by Baptiste Coudurier's avatar Baptiste Coudurier

add OPT_INT64 option

Originally committed as revision 8554 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a4072c45
...@@ -98,6 +98,8 @@ unknown_opt: ...@@ -98,6 +98,8 @@ unknown_opt:
*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_INT64) {
*po->u.int64_arg = atoll(arg);
} else if (po->flags & OPT_FLOAT) { } else if (po->flags & OPT_FLOAT) {
*po->u.float_arg = atof(arg); *po->u.float_arg = atof(arg);
} else if (po->flags & OPT_FUNC2) { } else if (po->flags & OPT_FUNC2) {
......
...@@ -36,12 +36,14 @@ typedef struct { ...@@ -36,12 +36,14 @@ typedef struct {
#define OPT_FLOAT 0x0100 #define OPT_FLOAT 0x0100
#define OPT_SUBTITLE 0x0200 #define OPT_SUBTITLE 0x0200
#define OPT_FUNC2 0x0400 #define OPT_FUNC2 0x0400
#define OPT_INT64 0x0800
union { union {
void (*func_arg)(const char *); //FIXME passing error code as int return would be nicer then exit() in the func void (*func_arg)(const char *); //FIXME passing error code as int return would be nicer then exit() in the func
int *int_arg; int *int_arg;
char **str_arg; char **str_arg;
float *float_arg; float *float_arg;
int (*func2_arg)(const char *, const char *); int (*func2_arg)(const char *, const char *);
int64_t *int64_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