From 507fa7e2c23623dcbecf20a392ee025002c83866 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Wed, 27 Jul 2011 20:59:44 +0300 Subject: options: indicate ambiguous option parameters explicitly Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either. --- 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 26bbb7a55a..6217fe6283 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,arg,M_CONFIG_FILE) < 0) { + if (m_option_parse(&url_opt, "stream url", 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