mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
msg: print MSGL_WARN and higher error messages to stderr
mpv has a convention of printing everything to stdout. The reasons for this are pretty unclear and in certain situations rather unintuitive. It leads to some bad behavior in fringe cases with encoding mode and isn't the norm for programs so just adjust it so warnings and up are printed to stderr. Fixes #8608.
This commit is contained in:
parent
99f367f219
commit
4939570e17
@ -306,7 +306,8 @@ static void print_terminal_line(struct mp_log *log, int lev,
|
||||
return;
|
||||
|
||||
struct mp_log_root *root = log->root;
|
||||
FILE *stream = (root->force_stderr || lev == MSGL_STATUS) ? stderr : stdout;
|
||||
FILE *stream = (root->force_stderr || lev == MSGL_STATUS || lev == MSGL_FATAL ||
|
||||
lev == MSGL_ERR || lev == MSGL_WARN) ? stderr : stdout;
|
||||
|
||||
if (lev != MSGL_STATUS)
|
||||
flush_status_line(root);
|
||||
|
Loading…
Reference in New Issue
Block a user