Commit 27561c17 authored by michael's avatar michael

simplify


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11141 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ca25cfb9
...@@ -191,9 +191,6 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c ...@@ -191,9 +191,6 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
dst= ((uint8_t*)obj) + o->offset; dst= ((uint8_t*)obj) + o->offset;
if(o_out) *o_out= o; if(o_out) *o_out= o;
if(o->type == FF_OPT_TYPE_STRING)
return *(void**)dst;
switch(o->type){ switch(o->type){
case FF_OPT_TYPE_FLAGS: snprintf(buf, buf_len, "0x%08X",*(int *)dst);break; 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_INT: snprintf(buf, buf_len, "%d" , *(int *)dst);break;
...@@ -201,6 +198,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c ...@@ -201,6 +198,7 @@ const char *av_get_string(void *obj, const char *name, const AVOption **o_out, c
case FF_OPT_TYPE_FLOAT: snprintf(buf, buf_len, "%f" , *(float *)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_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; case FF_OPT_TYPE_RATIONAL: snprintf(buf, buf_len, "%d/%d", ((AVRational*)dst)->num, ((AVRational*)dst)->den);break;
case FF_OPT_TYPE_STRING: return *(void**)dst;
default: return NULL; default: return NULL;
} }
return buf; return buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment