Browse code

OPT_INT

Originally committed as revision 3092 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer authored on 2004/04/30 22:41:48
Showing 2 changed files
... ...
@@ -81,6 +81,8 @@ void parse_options(int argc, char **argv, const OptionDef *options)
81 81
                 *po->u.str_arg = str;
82 82
             } else if (po->flags & OPT_BOOL) {
83 83
                 *po->u.int_arg = 1;
84
+            } else if (po->flags & OPT_INT) {
85
+                *po->u.int_arg = atoi(arg);
84 86
             } else {
85 87
 		po->u.func_arg(arg);
86 88
             }
... ...
@@ -11,6 +11,7 @@ typedef struct {
11 11
 #define OPT_VIDEO  0x0010
12 12
 #define OPT_AUDIO  0x0020
13 13
 #define OPT_GRAB   0x0040
14
+#define OPT_INT    0x0080
14 15
     union {
15 16
         void (*func_arg)(const char *);
16 17
         int *int_arg;