[MPlayer-cvslog] r20257 - in trunk: DOCS/man/en/mplayer.1 cfg-mplayer.h mplayer.c

rtogni subversion at mplayerhq.hu
Sun Oct 15 23:27:15 CEST 2006


Author: rtogni
Date: Sun Oct 15 23:27:15 2006
New Revision: 20257

Modified:
   trunk/cfg-mplayer.h
   trunk/mplayer.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Log:
Disable loading of file-specific configuration file from the same 
directory as the played file. Add a command-line switch to enable it.
Patch by reimar, manpage patch by me


Modified: trunk/cfg-mplayer.h
==============================================================================
--- trunk/cfg-mplayer.h	(original)
+++ trunk/cfg-mplayer.h	Sun Oct 15 23:27:15 2006
@@ -100,6 +100,7 @@
 extern void revertPPOpt(void *conf, char* opt);
 extern char* pp_help;
 extern int enable_mouse_movements;
+extern int use_filedir_conf;
 
 m_option_t vd_conf[]={
 	{"help", "Use MPlayer with an appropriate video file instead of live partners to avoid vd.\n", CONF_TYPE_PRINT, CONF_NOCFG|CONF_GLOBAL, 0, 0, NULL},
@@ -277,6 +278,8 @@
 
 //---------------------- mplayer-only options ------------------------
 
+	{"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
+	{"use-filedir-conf", &use_filedir_conf, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 #ifdef CRASH_DEBUG
 	{"crash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 	{"nocrash-debug", &crash_debug, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	(original)
+++ trunk/mplayer.c	Sun Oct 15 23:27:15 2006
@@ -413,6 +413,7 @@
 short edl_decision = 0; ///< 1 when an EDL operation has been made.
 FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode.
 float begin_skip = MP_NOPTS_VALUE; ///< start time of the current skip while on edlout mode
+int use_filedir_conf;
 
 static unsigned int inited_flags=0;
 #define INITED_VO 1
@@ -854,7 +855,7 @@
 
     sprintf (cfg, "%s.conf", file);
     
-    if (!stat (cfg, &st))
+    if (use_filedir_conf && !stat (cfg, &st))
     {
 	mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, cfg);
 	m_config_parse_config_file (conf, cfg);



More information about the MPlayer-cvslog mailing list