summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-28 11:07:47 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-29 05:50:38 +0300
commite873d703e956d3e2e68b9e18562983b029b5c7a8 (patch)
tree44a2c48ae4e94bd580ffd5833cd71a037af36043 /command.c
parentd8374376c0d46ffab88b96eb32b52621c34f562c (diff)
downloadmpv-e873d703e956d3e2e68b9e18562983b029b5c7a8.tar.bz2
mpv-e873d703e956d3e2e68b9e18562983b029b5c7a8.tar.xz
options: change option parsing to use bstr
Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings.
Diffstat (limited to 'command.c')
-rw-r--r--command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/command.c b/command.c
index fda7c25626..4b502b3cc9 100644
--- a/command.c
+++ b/command.c
@@ -232,7 +232,8 @@ static int mp_property_generic_option(struct m_option *prop, int action,
void *arg, MPContext *mpctx)
{
char *optname = prop->priv;
- const struct m_option *opt = m_config_get_option(mpctx->mconfig, optname);
+ const struct m_option *opt = m_config_get_option(mpctx->mconfig,
+ bstr(optname));
void *valptr = m_option_get_ptr(opt, &mpctx->opts);
switch (action) {