static int set_string_number(void *obj, const AVOption *o, const char *val, void *dst)

{

    int ret = 0, notfirst = 0;

    for (;;) {

        int i, den = 1;

        char buf[256];

        int cmd = 0;

        double d, num = 1;

        int64_t intnum = 1;



        if (*val == '+' || *val == '-')

            cmd = *(val++);



        for (i = 0; i < sizeof(buf) - 1 && val[i] && val[i] != '+' && val[i] != '-'; i++)

            buf[i] = val[i];

        buf[i] = 0;



        {

            const AVOption *o_named = av_opt_find(obj, buf, o->unit, 0, 0);

            if (o_named && o_named->type == AV_OPT_TYPE_CONST)

                d = DEFAULT_NUMVAL(o_named);

            else if (!strcmp(buf, "default")) d = DEFAULT_NUMVAL(o);

            else if (!strcmp(buf, "max"    )) d = o->max;

            else if (!strcmp(buf, "min"    )) d = o->min;

            else if (!strcmp(buf, "none"   )) d = 0;

            else if (!strcmp(buf, "all"    )) d = ~0;

            else {

                int res = av_expr_parse_and_eval(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj);

                if (res < 0) {

                    av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val);

                    return res;

                }

            }

        }

        if (o->type == AV_OPT_TYPE_FLAGS) {

            read_number(o, dst, NULL, NULL, &intnum);

            if      (cmd == '+') d = intnum | (int64_t)d;

            else if (cmd == '-') d = intnum &~(int64_t)d;

        } else {

            read_number(o, dst, &num, &den, &intnum);

            if      (cmd == '+') d = notfirst*num*intnum/den + d;

            else if (cmd == '-') d = notfirst*num*intnum/den - d;

        }



        if ((ret = write_number(obj, o, dst, d, 1, 1)) < 0)

            return ret;

        val += i;

        if (!*val)

            return 0;

        notfirst = 1;

    }



    return 0;

}

static int set_string_number(void *obj, const AVOption *o, const char *val, void *dst)

{

    int ret = 0, notfirst = 0;

    for (;;) {

        int i, den = 1;

        char buf[256];

        int cmd = 0;

        double d, num = 1;

        int64_t intnum = 1;



        if (*val == '+' || *val == '-')

            cmd = *(val++);



        for (i = 0; i < sizeof(buf) - 1 && val[i] && val[i] != '+' && val[i] != '-'; i++)

            buf[i] = val[i];

        buf[i] = 0;



        {

            const AVOption *o_named = av_opt_find(obj, buf, o->unit, 0, 0);

            if (o_named && o_named->type == AV_OPT_TYPE_CONST)

                d = DEFAULT_NUMVAL(o_named);

            else if (!strcmp(buf, "default")) d = DEFAULT_NUMVAL(o);

            else if (!strcmp(buf, "max"    )) d = o->max;

            else if (!strcmp(buf, "min"    )) d = o->min;

            else if (!strcmp(buf, "none"   )) d = 0;

            else if (!strcmp(buf, "all"    )) d = ~0;

            else {

                int res = av_expr_parse_and_eval(&d, buf, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, obj);

                if (res < 0) {

                    av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", val);

                    return res;

                }

            }

        }

        if (o->type == AV_OPT_TYPE_FLAGS) {

            read_number(o, dst, NULL, NULL, &intnum);

            if      (cmd == '+') d = intnum | (int64_t)d;

            else if (cmd == '-') d = intnum &~(int64_t)d;

        } else {

            read_number(o, dst, &num, &den, &intnum);

            if      (cmd == '+') d = notfirst*num*intnum/den + d;

            else if (cmd == '-') d = notfirst*num*intnum/den - d;

        }



        if ((ret = write_number(obj, o, dst, d, 1, 1)) < 0)

            return ret;

        val += i;

        if (!*val)

            return 0;

        notfirst = 1;

    }



    return 0;

}

static int FUNC_0(void *VAR_0, const AVOption *VAR_1, const char *VAR_2, void *VAR_3)

{

    int VAR_4 = 0, VAR_5 = 0;

    for (;;) {

        int VAR_6, VAR_7 = 1;

        char VAR_8[256];

        int VAR_9 = 0;

        double VAR_10, VAR_11 = 1;

        int64_t intnum = 1;



        if (*VAR_2 == '+' || *VAR_2 == '-')

            VAR_9 = *(VAR_2++);



        for (VAR_6 = 0; VAR_6 < sizeof(VAR_8) - 1 && VAR_2[VAR_6] && VAR_2[VAR_6] != '+' && VAR_2[VAR_6] != '-'; VAR_6++)

            VAR_8[VAR_6] = VAR_2[VAR_6];

        VAR_8[VAR_6] = 0;



        {

            const AVOption *VAR_12 = av_opt_find(VAR_0, VAR_8, VAR_1->unit, 0, 0);

            if (VAR_12 && VAR_12->type == AV_OPT_TYPE_CONST)

                VAR_10 = DEFAULT_NUMVAL(VAR_12);

            else if (!strcmp(VAR_8, "default")) VAR_10 = DEFAULT_NUMVAL(VAR_1);

            else if (!strcmp(VAR_8, "max"    )) VAR_10 = VAR_1->max;

            else if (!strcmp(VAR_8, "min"    )) VAR_10 = VAR_1->min;

            else if (!strcmp(VAR_8, "none"   )) VAR_10 = 0;

            else if (!strcmp(VAR_8, "all"    )) VAR_10 = ~0;

            else {

                int VAR_13 = av_expr_parse_and_eval(&VAR_10, VAR_8, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, VAR_0);

                if (VAR_13 < 0) {

                    av_log(VAR_0, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", VAR_2);

                    return VAR_13;

                }

            }

        }

        if (VAR_1->type == AV_OPT_TYPE_FLAGS) {

            read_number(VAR_1, VAR_3, NULL, NULL, &intnum);

            if      (VAR_9 == '+') VAR_10 = intnum | (int64_t)VAR_10;

            else if (VAR_9 == '-') VAR_10 = intnum &~(int64_t)VAR_10;

        } else {

            read_number(VAR_1, VAR_3, &VAR_11, &VAR_7, &intnum);

            if      (VAR_9 == '+') VAR_10 = VAR_5*VAR_11*intnum/VAR_7 + VAR_10;

            else if (VAR_9 == '-') VAR_10 = VAR_5*VAR_11*intnum/VAR_7 - VAR_10;

        }



        if ((VAR_4 = write_number(VAR_0, VAR_1, VAR_3, VAR_10, 1, 1)) < 0)

            return VAR_4;

        VAR_2 += VAR_6;

        if (!*VAR_2)

            return 0;

        VAR_5 = 1;

    }



    return 0;

}

static int FUNC_0(void *VAR_0, const AVOption *VAR_1, const char *VAR_2, void *VAR_3)
{ int VAR_4 = 0, VAR_5 = 0; for (;;) { int VAR_6, VAR_7 = 1; char VAR_8[256]; int VAR_9 = 0; double VAR_10, VAR_11 = 1; int64_t intnum = 1; if (*VAR_2 == '+' || *VAR_2 == '-')
VAR_9 = *(VAR_2++); for (VAR_6 = 0; VAR_6 < sizeof(VAR_8) - 1 && VAR_2[VAR_6] && VAR_2[VAR_6] != '+' && VAR_2[VAR_6] != '-'; VAR_6++) VAR_8[VAR_6] = VAR_2[VAR_6]; VAR_8[VAR_6] = 0; { const AVOption *VAR_12 = av_opt_find(VAR_0, VAR_8, VAR_1->unit, 0, 0); if (VAR_12 && VAR_12->type == AV_OPT_TYPE_CONST)
VAR_10 = DEFAULT_NUMVAL(VAR_12); else if (!strcmp(VAR_8, "default")) VAR_10 = DEFAULT_NUMVAL(VAR_1); else if (!strcmp(VAR_8, "max"    )) VAR_10 = VAR_1->max; else if (!strcmp(VAR_8, "min"    )) VAR_10 = VAR_1->min; else if (!strcmp(VAR_8, "none"   )) VAR_10 = 0; else if (!strcmp(VAR_8, "all"    )) VAR_10 = ~0; else { int VAR_13 = av_expr_parse_and_eval(&VAR_10, VAR_8, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, VAR_0); if (VAR_13 < 0) { av_log(VAR_0, AV_LOG_ERROR, "Unable to parse option value \"%s\"\n", VAR_2); return VAR_13; } } } if (VAR_1->type == AV_OPT_TYPE_FLAGS) { read_number(VAR_1, VAR_3, NULL, NULL, &intnum); if      (VAR_9 == '+') VAR_10 = intnum | (int64_t)VAR_10; else if (VAR_9 == '-') VAR_10 = intnum &~(int64_t)VAR_10; } else { read_number(VAR_1, VAR_3, &VAR_11, &VAR_7, &intnum); if      (VAR_9 == '+') VAR_10 = VAR_5*VAR_11*intnum/VAR_7 + VAR_10; else if (VAR_9 == '-') VAR_10 = VAR_5*VAR_11*intnum/VAR_7 - VAR_10; } if ((VAR_4 = write_number(VAR_0, VAR_1, VAR_3, VAR_10, 1, 1)) < 0)
return VAR_4; VAR_2 += VAR_6; if (!*VAR_2)
return 0; VAR_5 = 1; } return 0; }