summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-11 23:50:44 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-13 03:26:45 -0800
commitd53c0604ca796020e5ac26f08c0d6fd0c8201718 (patch)
tree3b62bcd1b1eb392a898b0d9bf78176e5c8ad9bff /player
parent69d062ce373be7884bbde85e2b03f5c0f5789e05 (diff)
downloadmpv-d53c0604ca796020e5ac26f08c0d6fd0c8201718.tar.bz2
mpv-d53c0604ca796020e5ac26f08c0d6fd0c8201718.tar.xz
player: silence config file loading message on resuming
This is just an implementation detail; seems to be ugly to log it by default. Other cases of the try_load_config() function should be logged, though.
Diffstat (limited to 'player')
-rw-r--r--player/configfiles.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/player/configfiles.c b/player/configfiles.c
index 3f0b57cde3..04e0ea4132 100644
--- a/player/configfiles.c
+++ b/player/configfiles.c
@@ -82,11 +82,12 @@ void mp_parse_cfgfiles(struct MPContext *mpctx)
m_config_set_profile(conf, SECT_ENCODE, 0);
}
-static int try_load_config(struct MPContext *mpctx, const char *file, int flags)
+static int try_load_config(struct MPContext *mpctx, const char *file, int flags,
+ int msgl)
{
if (!mp_path_exists(file))
return 0;
- MP_INFO(mpctx, "Loading config '%s'\n", file);
+ MP_MSG(mpctx, msgl, "Loading config '%s'\n", file);
m_config_parse_config_file(mpctx->mconfig, file, NULL, flags);
return 1;
}
@@ -114,14 +115,14 @@ static void mp_load_per_file_config(struct MPContext *mpctx)
bstr dir = mp_dirname(cfg);
char *dircfg = mp_path_join_bstr(NULL, dir, bstr0("mpv.conf"));
- try_load_config(mpctx, dircfg, FILE_LOCAL_FLAGS);
+ try_load_config(mpctx, dircfg, FILE_LOCAL_FLAGS, MSGL_INFO);
talloc_free(dircfg);
- if (try_load_config(mpctx, cfg, FILE_LOCAL_FLAGS))
+ if (try_load_config(mpctx, cfg, FILE_LOCAL_FLAGS, MSGL_INFO))
return;
if ((confpath = mp_find_config_file(NULL, mpctx->global, name))) {
- try_load_config(mpctx, confpath, FILE_LOCAL_FLAGS);
+ try_load_config(mpctx, confpath, FILE_LOCAL_FLAGS, MSGL_INFO);
talloc_free(confpath);
}
@@ -405,7 +406,7 @@ void mp_load_playback_resume(struct MPContext *mpctx, const char *file)
m_config_backup_opt(mpctx->mconfig, "start");
MP_INFO(mpctx, "Resuming playback. This behavior can "
"be disabled with --no-resume-playback.\n");
- try_load_config(mpctx, fname, M_SETOPT_PRESERVE_CMDLINE);
+ try_load_config(mpctx, fname, M_SETOPT_PRESERVE_CMDLINE, MSGL_V);
unlink(fname);
}
talloc_free(fname);