player: don't complain on too long filenames

mpv supports per-file config files, basically filename+".conf". We use
a static buffer for the new filename, and if that buffer is too small,
we print a warning. This is confusing for e.g. long URLs, so just hide
the warning by default.

Why not dynamically allocate the buffer? Who cares.
This commit is contained in:
wm4 2014-05-10 16:08:07 +02:00
parent 6f86e32630
commit 4b367d1602
1 changed files with 2 additions and 2 deletions

View File

@ -114,8 +114,8 @@ static void mp_load_per_file_config(struct MPContext *mpctx)
const char *file = mpctx->filename; const char *file = mpctx->filename;
if (snprintf(cfg, sizeof(cfg), "%s.conf", file) >= sizeof(cfg)) { if (snprintf(cfg, sizeof(cfg), "%s.conf", file) >= sizeof(cfg)) {
MP_WARN(mpctx, "Filename is too long, " MP_VERBOSE(mpctx, "Filename is too long, "
"can not load file or directory specific config files\n"); "can not load file or directory specific config files\n");
return; return;
} }