str = strdup(arg);
str = av_strdup(arg);
void parse_options(int argc, char **argv, const OptionDef *options){    const char *opt, *arg;    int optindex;    const OptionDef *po;    /* parse options */    optindex = 1;    while (optindex < argc) {        opt = argv[optindex++];                if (opt[0] == '-' && opt[1] != '\0') {            po = options;            while (po->name != NULL) {                if (!strcmp(opt + 1, po->name))                    break;                po++;            }            if (!po->name) {                fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], opt);                exit(1);            }            arg = NULL;            if (po->flags & HAS_ARG) {                arg = argv[optindex++];                if (!arg) {                    fprintf(stderr, "%s: missing argument for option '%s'\n", argv[0], opt);                    exit(1);                }            }            if (po->flags & OPT_STRING) {                char *str;                str = strdup(arg);                *po->u.str_arg = str;            } else if (po->flags & OPT_BOOL) {                *po->u.int_arg = 1;            } else {		po->u.func_arg(arg);            }        } else {            parse_arg_file(opt);        }    }}