static int write_option(void *optctx, const OptionDef *po, const char *opt,

                        const char *arg)

{

    /* new-style options contain an offset into optctx, old-style address of

     * a global var*/

    void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ?

                (uint8_t *)optctx + po->u.off : po->u.dst_ptr;

    int *dstcount;



    if (po->flags & OPT_SPEC) {

        SpecifierOpt **so = dst;

        char *p = strchr(opt, ':');



        dstcount = (int *)(so + 1);

        *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1);

        (*so)[*dstcount - 1].specifier = av_strdup(p ? p + 1 : "");

        dst = &(*so)[*dstcount - 1].u;

    }



    if (po->flags & OPT_STRING) {

        char *str;

        str = av_strdup(arg);

        av_freep(dst);

        *(char **)dst = str;

    } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {

        *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);

    } else if (po->flags & OPT_INT64) {

        *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);

    } else if (po->flags & OPT_TIME) {

        *(int64_t *)dst = parse_time_or_die(opt, arg, 1);

    } else if (po->flags & OPT_FLOAT) {

        *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);

    } else if (po->flags & OPT_DOUBLE) {

        *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY);

    } else if (po->u.func_arg) {

        int ret = po->u.func_arg(optctx, opt, arg);

        if (ret < 0) {

            av_log(NULL, AV_LOG_ERROR,

                   "Failed to set value '%s' for option '%s'\n", arg, opt);

            return ret;

        }

    }

    if (po->flags & OPT_EXIT)

        exit(0);



    return 0;

}

static int write_option(void *optctx, const OptionDef *po, const char *opt,

                        const char *arg)

{

    



    void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ?

                (uint8_t *)optctx + po->u.off : po->u.dst_ptr;

    int *dstcount;



    if (po->flags & OPT_SPEC) {

        SpecifierOpt **so = dst;

        char *p = strchr(opt, ':');



        dstcount = (int *)(so + 1);

        *so = grow_array(*so, sizeof(**so), dstcount, *dstcount + 1);

        (*so)[*dstcount - 1].specifier = av_strdup(p ? p + 1 : "");

        dst = &(*so)[*dstcount - 1].u;

    }



    if (po->flags & OPT_STRING) {

        char *str;

        str = av_strdup(arg);

        av_freep(dst);

        *(char **)dst = str;

    } else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {

        *(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);

    } else if (po->flags & OPT_INT64) {

        *(int64_t *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT64_MIN, INT64_MAX);

    } else if (po->flags & OPT_TIME) {

        *(int64_t *)dst = parse_time_or_die(opt, arg, 1);

    } else if (po->flags & OPT_FLOAT) {

        *(float *)dst = parse_number_or_die(opt, arg, OPT_FLOAT, -INFINITY, INFINITY);

    } else if (po->flags & OPT_DOUBLE) {

        *(double *)dst = parse_number_or_die(opt, arg, OPT_DOUBLE, -INFINITY, INFINITY);

    } else if (po->u.func_arg) {

        int ret = po->u.func_arg(optctx, opt, arg);

        if (ret < 0) {

            av_log(NULL, AV_LOG_ERROR,

                   "Failed to set value '%s' for option '%s'\n", arg, opt);

            return ret;

        }

    }

    if (po->flags & OPT_EXIT)

        exit(0);



    return 0;

}

        exit(0);
static int FUNC_0(void *VAR_0, const OptionDef *VAR_1, const char *VAR_2,

                        const char *VAR_3)

{

    



    void *VAR_4 = VAR_1->flags & (OPT_OFFSET | OPT_SPEC) ?

                (uint8_t *)VAR_0 + VAR_1->u.off : VAR_1->u.dst_ptr;

    int *VAR_5;



    if (VAR_1->flags & OPT_SPEC) {

        SpecifierOpt **so = VAR_4;

        char *VAR_6 = strchr(VAR_2, ':');



        VAR_5 = (int *)(so + 1);

        *so = grow_array(*so, sizeof(**so), VAR_5, *VAR_5 + 1);

        (*so)[*VAR_5 - 1].specifier = av_strdup(VAR_6 ? VAR_6 + 1 : "");

        VAR_4 = &(*so)[*VAR_5 - 1].u;

    }



    if (VAR_1->flags & OPT_STRING) {

        char *VAR_7;

        VAR_7 = av_strdup(VAR_3);

        av_freep(VAR_4);

        *(char **)VAR_4 = VAR_7;

    } else if (VAR_1->flags & OPT_BOOL || VAR_1->flags & OPT_INT) {

        *(int *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_INT64, INT_MIN, INT_MAX);

    } else if (VAR_1->flags & OPT_INT64) {

        *(int64_t *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_INT64, INT64_MIN, INT64_MAX);

    } else if (VAR_1->flags & OPT_TIME) {

        *(int64_t *)VAR_4 = parse_time_or_die(VAR_2, VAR_3, 1);

    } else if (VAR_1->flags & OPT_FLOAT) {

        *(float *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_FLOAT, -INFINITY, INFINITY);

    } else if (VAR_1->flags & OPT_DOUBLE) {

        *(double *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_DOUBLE, -INFINITY, INFINITY);

    } else if (VAR_1->u.func_arg) {

        int VAR_8 = VAR_1->u.func_arg(VAR_0, VAR_2, VAR_3);

        if (VAR_8 < 0) {

            av_log(NULL, AV_LOG_ERROR,

                   "Failed to set value '%s' for option '%s'\n", VAR_3, VAR_2);

            return VAR_8;

        }

    }

    if (VAR_1->flags & OPT_EXIT)

        exit(0);



    return 0;

}

static int FUNC_0(void *VAR_0, const OptionDef *VAR_1, const char *VAR_2,
const char *VAR_3)
{ void *VAR_4 = VAR_1->flags & (OPT_OFFSET | OPT_SPEC) ?
(uint8_t *)VAR_0 + VAR_1->u.off : VAR_1->u.dst_ptr; int *VAR_5; if (VAR_1->flags & OPT_SPEC) { SpecifierOpt **so = VAR_4; char *VAR_6 = strchr(VAR_2, ':'); VAR_5 = (int *)(so + 1); *so = grow_array(*so, sizeof(**so), VAR_5, *VAR_5 + 1); (*so)[*VAR_5 - 1].specifier = av_strdup(VAR_6 ? VAR_6 + 1 : ""); VAR_4 = &(*so)[*VAR_5 - 1].u; } if (VAR_1->flags & OPT_STRING) { char *VAR_7; VAR_7 = av_strdup(VAR_3); av_freep(VAR_4); *(char **)VAR_4 = VAR_7; } else if (VAR_1->flags & OPT_BOOL || VAR_1->flags & OPT_INT) { *(int *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_INT64, INT_MIN, INT_MAX); } else if (VAR_1->flags & OPT_INT64) { *(int64_t *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_INT64, INT64_MIN, INT64_MAX); } else if (VAR_1->flags & OPT_TIME) { *(int64_t *)VAR_4 = parse_time_or_die(VAR_2, VAR_3, 1); } else if (VAR_1->flags & OPT_FLOAT) { *(float *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_FLOAT, -INFINITY, INFINITY); } else if (VAR_1->flags & OPT_DOUBLE) { *(double *)VAR_4 = parse_number_or_die(VAR_2, VAR_3, OPT_DOUBLE, -INFINITY, INFINITY); } else if (VAR_1->u.func_arg) { int VAR_8 = VAR_1->u.func_arg(VAR_0, VAR_2, VAR_3); if (VAR_8 < 0) { av_log(NULL, AV_LOG_ERROR,
"Failed to set value '%s' for option '%s'\n", VAR_3, VAR_2); return VAR_8; } } if (VAR_1->flags & OPT_EXIT)
exit(0); return 0; }