[FFmpeg-devel] [PATCH 1/7] opt: Remove dead code

Timothy Gu timothygu99 at gmail.com
Fri Feb 6 08:06:39 CET 2015


---
 libavutil/opt.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index c68dacc..45fcf95 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -256,8 +256,6 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con
         if (!i || !*val)
             return 0;
     }
-
-    return 0;
 }
 
 static int set_string_image_size(void *obj, const AVOption *o, const char *val, int *dst)
@@ -294,13 +292,11 @@ static int set_string_color(void *obj, const AVOption *o, const char *val, uint8
 
     if (!val) {
         return 0;
-    } else {
-        ret = av_parse_color(dst, val, -1, obj);
-        if (ret < 0)
-            av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\" as color\n", val);
-        return ret;
     }
-    return 0;
+    ret = av_parse_color(dst, val, -1, obj);
+    if (ret < 0)
+        av_log(obj, AV_LOG_ERROR, "Unable to parse option value \"%s\" as color\n", val);
+    return ret;
 }
 
 static int set_string_fmt(void *obj, const AVOption *o, const char *val, uint8_t *dst,
-- 
1.9.1



More information about the ffmpeg-devel mailing list