diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-12-03 01:06:00 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-12-03 01:06:00 +0000 |
commit | b81f2b3d2fc02d3fbfba5c7d2d954afd91090f66 (patch) | |
tree | 2c1585c2420aec452bc2b221808f7ce38c6a87a9 /libavcodec/opt.c | |
parent | 24cdc39e9dfd2b98e96c96387903bd41313bd0dd (diff) | |
download | ffmpeg-b81f2b3d2fc02d3fbfba5c7d2d954afd91090f66.tar.gz |
simplify
Originally committed as revision 11141 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r-- | libavcodec/opt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c index e43e0c1505..c11dcd3ec9 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.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; if(o_out) *o_out= o; - if(o->type == FF_OPT_TYPE_STRING) - return *(void**)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; @@ -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_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_STRING: return *(void**)dst; default: return NULL; } return buf; |