changeset 5977:853d1ea80942 libavcodec

simplify
author michael
date Mon, 03 Dec 2007 01:06:00 +0000
parents 58ee364cd8fb
children eb2b4b1da4cd
files opt.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/opt.c	Mon Dec 03 01:03:54 2007 +0000
+++ b/opt.c	Mon Dec 03 01:06:00 2007 +0000
@@ -191,9 +191,6 @@
     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 @@
     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;