[MPlayer-dev-eng] [PATCH] Adds some more checks in parser-mpcmd.c

Alban Bedel albeu at free.fr
Tue Dec 10 12:43:18 CET 2002


Hi Puk Madick,

on Tue, 10 Dec 2002 01:04:04 +0800 you wrote:

> Read on the user-mailinglist that mplayer seg faults with this cmdline
> 'mplayer -gui'. 

I think that part of your fix is wrong
-		tmp = m_config_set_option(config, opt, argv[i + 1]);
+		tmp = (i+1<argc) ? m_config_set_option(config, opt, argv[i + 1]) : -1;
should be
+		tmp = (i+1<argc) ? m_config_set_option(config, opt, argv[i + 1]) : m_config_set_option(config, opt, NULL);
otherwise it'll drop the last option if it's a flag option.
	Albeu



More information about the MPlayer-dev-eng mailing list