0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20257 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtogni 2006-10-15 21:27:15 +00:00
parent 40f9cdbdd8
commit c844ece6d4
3 changed files with 10 additions and 1 deletions

View File

@ -720,6 +720,11 @@ Display even less output and status messages than with \-quiet.
Show the description and content of a profile.
.
.TP
.B \-use-filedir-conf
Look for file-specific configuration file in the same directory as
the file that is been played.
.
.TP
.B "\-v\ \ \ \ \ "
Increment verbosity level, one level for each \-v
found on the command line.

View File

@ -100,6 +100,7 @@ extern int readPPOpt(void *conf, char *arg);
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 @@ m_option_t mplayer_opts[]={
//---------------------- 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},

View File

@ -413,6 +413,7 @@ short edl_muted = 0; ///< Stores whether EDL is currently in muted mode.
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 @@ void load_per_file_config (m_config_t* conf, const char *const file)
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);