static int get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)

{

    const AVOption *o = av_opt_find(obj, name, NULL, 0, 0);

    void *dst;

    if (!o || o->offset<=0)

        goto error;



    dst= ((uint8_t*)obj) + o->offset;



    if (o_out) *o_out= o;



    switch (o->type) {

    case FF_OPT_TYPE_FLAGS:     *intnum= *(unsigned int*)dst;return 0;

    case FF_OPT_TYPE_INT:       *intnum= *(int    *)dst;return 0;

    case FF_OPT_TYPE_INT64:     *intnum= *(int64_t*)dst;return 0;

    case FF_OPT_TYPE_FLOAT:     *num=    *(float  *)dst;return 0;

    case FF_OPT_TYPE_DOUBLE:    *num=    *(double *)dst;return 0;

    case FF_OPT_TYPE_RATIONAL:  *intnum= ((AVRational*)dst)->num;

                                *den   = ((AVRational*)dst)->den;

                                                        return 0;

    }

error:

    *den=*intnum=0;

    return -1;

}

static int get_number(void *obj, const char *name, const AVOption **o_out, double *num, int *den, int64_t *intnum)

{

    const AVOption *o = av_opt_find(obj, name, NULL, 0, 0);

    void *dst;

    if (!o || o->offset<=0)

        goto error;



    dst= ((uint8_t*)obj) + o->offset;



    if (o_out) *o_out= o;



    switch (o->type) {

    case FF_OPT_TYPE_FLAGS:     *intnum= *(unsigned int*)dst;return 0;

    case FF_OPT_TYPE_INT:       *intnum= *(int    *)dst;return 0;

    case FF_OPT_TYPE_INT64:     *intnum= *(int64_t*)dst;return 0;

    case FF_OPT_TYPE_FLOAT:     *num=    *(float  *)dst;return 0;

    case FF_OPT_TYPE_DOUBLE:    *num=    *(double *)dst;return 0;

    case FF_OPT_TYPE_RATIONAL:  *intnum= ((AVRational*)dst)->num;

                                *den   = ((AVRational*)dst)->den;

                                                        return 0;

    }

error:

    *den=*intnum=0;

    return -1;

}

static int FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, double *VAR_3, int *VAR_4, int64_t *VAR_5)

{

    const AVOption *VAR_6 = av_opt_find(VAR_0, VAR_1, NULL, 0, 0);

    void *VAR_7;

    if (!VAR_6 || VAR_6->offset<=0)

        goto error;



    VAR_7= ((uint8_t*)VAR_0) + VAR_6->offset;



    if (VAR_2) *VAR_2= VAR_6;



    switch (VAR_6->type) {

    case FF_OPT_TYPE_FLAGS:     *VAR_5= *(unsigned int*)VAR_7;return 0;

    case FF_OPT_TYPE_INT:       *VAR_5= *(int    *)VAR_7;return 0;

    case FF_OPT_TYPE_INT64:     *VAR_5= *(int64_t*)VAR_7;return 0;

    case FF_OPT_TYPE_FLOAT:     *VAR_3=    *(float  *)VAR_7;return 0;

    case FF_OPT_TYPE_DOUBLE:    *VAR_3=    *(double *)VAR_7;return 0;

    case FF_OPT_TYPE_RATIONAL:  *VAR_5= ((AVRational*)VAR_7)->VAR_3;

                                *VAR_4   = ((AVRational*)VAR_7)->VAR_4;

                                                        return 0;

    }

error:

    *VAR_4=*VAR_5=0;

    return -1;

}

static int FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, double *VAR_3, int *VAR_4, int64_t *VAR_5)
{ const AVOption *VAR_6 = av_opt_find(VAR_0, VAR_1, NULL, 0, 0); void *VAR_7; if (!VAR_6 || VAR_6->offset<=0)
goto error; VAR_7= ((uint8_t*)VAR_0) + VAR_6->offset; if (VAR_2) *VAR_2= VAR_6; switch (VAR_6->type) { case FF_OPT_TYPE_FLAGS:     *VAR_5= *(unsigned int*)VAR_7;return 0; case FF_OPT_TYPE_INT:       *VAR_5= *(int    *)VAR_7;return 0; case FF_OPT_TYPE_INT64:     *VAR_5= *(int64_t*)VAR_7;return 0; case FF_OPT_TYPE_FLOAT:     *VAR_3=    *(float  *)VAR_7;return 0; case FF_OPT_TYPE_DOUBLE:    *VAR_3=    *(double *)VAR_7;return 0; case FF_OPT_TYPE_RATIONAL:  *VAR_5= ((AVRational*)VAR_7)->VAR_3; *VAR_4   = ((AVRational*)VAR_7)->VAR_4; return 0; } error:
*VAR_4=*VAR_5=0; return -1; }