diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-07-28 11:07:47 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-07-29 05:50:38 +0300 |
commit | e873d703e956d3e2e68b9e18562983b029b5c7a8 (patch) | |
tree | 44a2c48ae4e94bd580ffd5833cd71a037af36043 /stream | |
parent | d8374376c0d46ffab88b96eb32b52621c34f562c (diff) | |
download | mpv-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 'stream')
-rw-r--r-- | stream/stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c index 6217fe6283..fc5185827b 100644 --- a/stream/stream.c +++ b/stream/stream.c @@ -166,7 +166,7 @@ static stream_t *open_stream_plugin(const stream_info_t *sinfo, if(sinfo->opts_url) { m_option_t url_opt = { "stream url", arg , CONF_TYPE_CUSTOM_URL, 0, 0 ,0, (void *)sinfo->opts }; - if (m_option_parse(&url_opt, "stream url", filename, false, arg) < 0) { + if (m_option_parse(&url_opt, bstr("stream url"), bstr(filename), false, arg) < 0) { mp_tmsg(MSGT_OPEN,MSGL_ERR, "URL parsing failed on url %s\n",filename); m_struct_free(desc,arg); return NULL; |