summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-14 11:21:29 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-04-14 11:21:29 +0000
commit6e62b3a85fc2c7a74dd3242bf123cc5f26adaeb0 (patch)
treef049be7e07ecb9657bce2fb8e6945475583099ec /mplayer.c
parentc439e8b46859edc563e3a7177c7b957acaeb7315 (diff)
downloadmpv-6e62b3a85fc2c7a74dd3242bf123cc5f26adaeb0.tar.bz2
mpv-6e62b3a85fc2c7a74dd3242bf123cc5f26adaeb0.tar.xz
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
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mplayer.c b/mplayer.c
index e005496ac5..d5ee16ebdc 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -821,7 +821,8 @@ static void parse_cfgfiles( m_config_t* conf )
{
char *conffile;
int conffile_fd;
-if (m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
+if (!disable_system_conf &&
+ m_config_parse_config_file(conf, MPLAYER_CONFDIR "/mplayer.conf") < 0)
exit_player(NULL);
if ((conffile = get_path("")) == NULL) {
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoHomeDir);
@@ -840,7 +841,8 @@ if ((conffile = get_path("")) == NULL) {
write(conffile_fd, default_config, strlen(default_config));
close(conffile_fd);
}
- if (m_config_parse_config_file(conf, conffile) < 0)
+ if (!disable_user_conf &&
+ m_config_parse_config_file(conf, conffile) < 0)
exit_player(NULL);
free(conffile);
}