Index: mplayer.c =================================================================== --- mplayer.c (revision 29565) +++ mplayer.c (working copy) @@ -12,6 +12,7 @@ #endif #include #include +#include // #include #include @@ -916,10 +917,23 @@ static void load_per_file_config (m_config_t* conf, const char *const file) { char *confpath; - char cfg[strlen(file)+10]; + char cfg[strlen(file)+14]; struct stat st; char *name; + if (use_filedir_conf) + { + confpath = strdup (file); + sprintf (cfg, "%s/mplayer.conf", dirname (confpath)); + free (confpath); + printf ("trying %s\n", cfg); + if (!stat (cfg, &st)) + { + mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_LoadingConfig, cfg); + m_config_parse_config_file (conf, cfg); + } + } + sprintf (cfg, "%s.conf", file); if (use_filedir_conf && !stat (cfg, &st))