From e873d703e956d3e2e68b9e18562983b029b5c7a8 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Thu, 28 Jul 2011 11:07:47 +0300 Subject: 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. --- stream/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stream') 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; -- cgit v1.2.3