summaryrefslogtreecommitdiff
path: root/libavutil/opt.c
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-11-10 13:03:09 +0100
committerNicolas George <nicolas.george@normalesup.org>2012-11-16 10:36:45 +0100
commit926481078b4f930ac9bb9ca2b4ab660cc9190935 (patch)
tree3e8572aa79c486e7ee9befbbcf8f8569c5846ccf /libavutil/opt.c
parent468781f8287b7bca8c560915a6f1ec6f37cfd4bd (diff)
lavu/opt: fix av_opt_get_key_value() API.
Do not skip the end delimiter. Reserve positive return values. This is an API break, but the function was introduced less than two weeks ago.
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r--libavutil/opt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 05ae8645f3..7a7f8930c8 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -870,8 +870,6 @@ int av_opt_get_key_value(const char **ropts,
av_free(key);
return AVERROR(ENOMEM);
}
- if (*opts && strchr(pairs_sep, *opts))
- opts++;
*ropts = opts;
*rkey = key;
*rval = val;
@@ -904,6 +902,8 @@ int av_opt_set_from_string(void *ctx, const char *opts,
av_err2str(ret));
return ret;
}
+ if (*opts)
+ opts++;
if (parsed_key) {
key = parsed_key;
while (*shorthand) /* discard all remaining shorthand */