const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len){

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

    void *dst;

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

        return NULL;

    if(o->type != FF_OPT_TYPE_STRING && (!buf || !buf_len))

        return NULL;



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

    if(o_out) *o_out= o;



    if(o->type == FF_OPT_TYPE_STRING)

        return dst;



    switch(o->type){

    case FF_OPT_TYPE_FLAGS:     snprintf(buf, buf_len, "0x%08X",*(int    *)dst);break;

    case FF_OPT_TYPE_INT:       snprintf(buf, buf_len, "%d" , *(int    *)dst);break;

    case FF_OPT_TYPE_INT64:     snprintf(buf, buf_len, "%"PRId64, *(int64_t*)dst);break;

    case FF_OPT_TYPE_FLOAT:     snprintf(buf, buf_len, "%f" , *(float  *)dst);break;

    case FF_OPT_TYPE_DOUBLE:    snprintf(buf, buf_len, "%f" , *(double *)dst);break;

    case FF_OPT_TYPE_RATIONAL:  snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break;

    default: return NULL;

    }

    return buf;

}

const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len){

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

    void *dst;

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

        return NULL;

    if(o->type != FF_OPT_TYPE_STRING && (!buf || !buf_len))

        return NULL;



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

    if(o_out) *o_out= o;



    if(o->type == FF_OPT_TYPE_STRING)

        return dst;



    switch(o->type){

    case FF_OPT_TYPE_FLAGS:     snprintf(buf, buf_len, "0x%08X",*(int    *)dst);break;

    case FF_OPT_TYPE_INT:       snprintf(buf, buf_len, "%d" , *(int    *)dst);break;

    case FF_OPT_TYPE_INT64:     snprintf(buf, buf_len, "%"PRId64, *(int64_t*)dst);break;

    case FF_OPT_TYPE_FLOAT:     snprintf(buf, buf_len, "%f" , *(float  *)dst);break;

    case FF_OPT_TYPE_DOUBLE:    snprintf(buf, buf_len, "%f" , *(double *)dst);break;

    case FF_OPT_TYPE_RATIONAL:  snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break;

    default: return NULL;

    }

    return buf;

}

        return dst;
const char *FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, char *VAR_3, int VAR_4){

    const AVOption *VAR_5= av_find_opt(VAR_0, VAR_1, NULL, 0, 0);

    void *VAR_6;

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

        return NULL;

    if(VAR_5->type != FF_OPT_TYPE_STRING && (!VAR_3 || !VAR_4))

        return NULL;



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

    if(VAR_2) *VAR_2= VAR_5;



    if(VAR_5->type == FF_OPT_TYPE_STRING)

        return VAR_6;



    switch(VAR_5->type){

    case FF_OPT_TYPE_FLAGS:     snprintf(VAR_3, VAR_4, "0x%08X",*(int    *)VAR_6);break;

    case FF_OPT_TYPE_INT:       snprintf(VAR_3, VAR_4, "%d" , *(int    *)VAR_6);break;

    case FF_OPT_TYPE_INT64:     snprintf(VAR_3, VAR_4, "%"PRId64, *(int64_t*)VAR_6);break;

    case FF_OPT_TYPE_FLOAT:     snprintf(VAR_3, VAR_4, "%f" , *(float  *)VAR_6);break;

    case FF_OPT_TYPE_DOUBLE:    snprintf(VAR_3, VAR_4, "%f" , *(double *)VAR_6);break;

    case FF_OPT_TYPE_RATIONAL:  snprintf(VAR_3, VAR_4, "%d/%d", ((AVRational*)VAR_6)->num, ((AVRational*)VAR_6)->den);break;

    default: return NULL;

    }

    return VAR_3;

}

const char *FUNC_0(void *VAR_0, const char *VAR_1, const AVOption **VAR_2, char *VAR_3, int VAR_4){ const AVOption *VAR_5= av_find_opt(VAR_0, VAR_1, NULL, 0, 0); void *VAR_6; if(!VAR_5 || VAR_5->offset<=0)
return NULL; if(VAR_5->type != FF_OPT_TYPE_STRING && (!VAR_3 || !VAR_4))
return NULL; VAR_6= ((uint8_t*)VAR_0) + VAR_5->offset; if(VAR_2) *VAR_2= VAR_5; if(VAR_5->type == FF_OPT_TYPE_STRING)
return VAR_6; switch(VAR_5->type){ case FF_OPT_TYPE_FLAGS:     snprintf(VAR_3, VAR_4, "0x%08X",*(int    *)VAR_6);break; case FF_OPT_TYPE_INT:       snprintf(VAR_3, VAR_4, "%d" , *(int    *)VAR_6);break; case FF_OPT_TYPE_INT64:     snprintf(VAR_3, VAR_4, "%"PRId64, *(int64_t*)VAR_6);break; case FF_OPT_TYPE_FLOAT:     snprintf(VAR_3, VAR_4, "%f" , *(float  *)VAR_6);break; case FF_OPT_TYPE_DOUBLE:    snprintf(VAR_3, VAR_4, "%f" , *(double *)VAR_6);break; case FF_OPT_TYPE_RATIONAL:  snprintf(VAR_3, VAR_4, "%d/%d", ((AVRational*)VAR_6)->num, ((AVRational*)VAR_6)->den);break; default: return NULL; } return VAR_3; }