From 6e62b3a85fc2c7a74dd3242bf123cc5f26adaeb0 Mon Sep 17 00:00:00 2001 From: albeu Date: Mon, 14 Apr 2008 11:21:29 +0000 Subject: Add options to disable some or all config files. Patch by Andrew Savchenko (Bircoph -at- list -dot- ru). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26448 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mencoder.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mencoder.c') diff --git a/mencoder.c b/mencoder.c index 69760c8642..ae35f3d5e2 100644 --- a/mencoder.c +++ b/mencoder.c @@ -311,9 +311,11 @@ static void mencoder_exit(int level, const char *how) static void parse_cfgfiles( m_config_t* conf ) { char *conffile; - if (m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mencoder.conf") < 0) + if (!disable_system_conf && + m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mencoder.conf") < 0) mencoder_exit(1,MSGTR_ConfigFileError); + if (!disable_user_conf) { if ((conffile = get_path("mencoder.conf")) == NULL) { mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_GetpathProblem); } else { @@ -321,6 +323,7 @@ static void parse_cfgfiles( m_config_t* conf ) mencoder_exit(1,MSGTR_ConfigFileError); free(conffile); } + } } -- cgit v1.2.3