diff options
author | Rudolf Polzer <divverent@xonotic.org> | 2013-04-15 13:25:51 +0200 |
---|---|---|
committer | Rudolf Polzer <divverent@xonotic.org> | 2013-04-15 13:30:21 +0200 |
commit | 0c1d95e81b100464d42e8c08c5293cf0729d118d (patch) | |
tree | 06b7c082a75ec85cd880176652fb4697aba2c309 /core/mp_msg.h | |
parent | df8a481eba2316f8171ec0cde4e8e192765aad16 (diff) | |
download | mpv-0c1d95e81b100464d42e8c08c5293cf0729d118d.tar.bz2 mpv-0c1d95e81b100464d42e8c08c5293cf0729d118d.tar.xz |
encoding: when output is pipe: or pipe:1, avoid mp_msg to stdout
I am aware this detection may occur too late, depending on other
settings, but at least it usually works and is portable.
Where the output fd can be changed, though, it'd be better to force a
similar behaviour via file descriptor use: use pipe:3 as output to FD 3,
and change the calling program to expect the stream on FD 3.
Diffstat (limited to 'core/mp_msg.h')
-rw-r--r-- | core/mp_msg.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/mp_msg.h b/core/mp_msg.h index 320912dd4c..392adcf01f 100644 --- a/core/mp_msg.h +++ b/core/mp_msg.h @@ -142,4 +142,6 @@ void mp_msg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4); void mp_tmsg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4); #define mp_dbg mp_msg +extern bool mp_msg_stdout_in_use; + #endif /* MPLAYER_MP_MSG_H */ |