summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-15 12:40:39 +0100
committerwm4 <wm4@nowhere>2012-11-16 21:21:14 +0100
commit88cfe47614f18b031b659c13951190405a0c8d31 (patch)
treeeb53b0ef3c157a299548d5793449e4596cd41e26
parenteb12bc4c2101f8185a932bcd7dda4419c3fa52ff (diff)
downloadmpv-88cfe47614f18b031b659c13951190405a0c8d31.tar.bz2
mpv-88cfe47614f18b031b659c13951190405a0c8d31.tar.xz
input: silence warning if input.conf is missing
It's silly to print a warning if an optional config file is missing. Don't print anything at the default message level if an input config is not found. Unfortunately, the behavior is the same for explicitly passed input config files (with --input=conf=file.conf).
-rw-r--r--core/input/input.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/input/input.c b/core/input/input.c
index 115d181e69..210aa54a4f 100644
--- a/core/input/input.c
+++ b/core/input/input.c
@@ -1722,6 +1722,10 @@ static int parse_config(struct input_ctx *ictx, bool builtin, bstr data,
static int parse_config_file(struct input_ctx *ictx, char *file)
{
+ if (!mp_path_exists(file)) {
+ mp_msg(MSGT_INPUT, MSGL_V, "Input config file %s missing.\n", file);
+ return 0;
+ }
stream_t *s = open_stream(file, NULL, NULL);
if (!s) {
mp_msg(MSGT_INPUT, MSGL_V, "Can't open input config file %s.\n", file);