diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-07-21 15:28:36 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-07-21 15:28:53 +0200 |
commit | 2c5c7f108926f935890843fc54b1ef03c14847bf (patch) | |
tree | 68920c411c784ee1bc59dbfb317e8056c5ffa05a /libavutil/opt.c | |
parent | 4927c0a9880be4e322d8256fea99b09568235665 (diff) | |
download | ffmpeg-2c5c7f108926f935890843fc54b1ef03c14847bf.tar.gz |
avutil/opt: remove dead code from set_string_number()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 8e9802fa48..56ed4ebb90 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -194,7 +194,7 @@ static int set_string(void *obj, const AVOption *o, const char *val, uint8_t **d static int set_string_number(void *obj, void *target_obj, const AVOption *o, const char *val, void *dst) { - int ret = 0, notfirst = 0; + int ret = 0; int num, den; char c; @@ -215,8 +215,6 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con if (*val == '+' || *val == '-') { if (o->type == AV_OPT_TYPE_FLAGS) cmd = *(val++); - else if (!notfirst) - buf[i++] = *val; } for (; i < sizeof(buf) - 1 && val[i] && (o->type != AV_OPT_TYPE_FLAGS || val[i] != '+' && val[i] != '-'); i++) @@ -244,10 +242,6 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con read_number(o, dst, NULL, NULL, &intnum); if (cmd == '+') d = intnum | (int64_t)d; else if (cmd == '-') d = intnum &~(int64_t)d; - } else { - read_number(o, dst, &num, &den, &intnum); - if (cmd == '+') d = notfirst*num*intnum/den + d; - else if (cmd == '-') d = notfirst*num*intnum/den - d; } if ((ret = write_number(obj, o, dst, d, 1, 1)) < 0) @@ -255,7 +249,6 @@ static int set_string_number(void *obj, void *target_obj, const AVOption *o, con val += i; if (!*val) return 0; - notfirst = 1; } return 0; |