summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-08 12:51:12 +0200
committerwm4 <wm4@nowhere>2014-10-08 12:51:12 +0200
commit2632ea3de618bc8b1e533260d9bb3aec277a80b3 (patch)
treecafaf05b85acbd996a913029fb20dda8c9a1341f /common
parent046ad8c5aef8e0b72b823bb4ac5f875db33dd1dd (diff)
downloadmpv-2632ea3de618bc8b1e533260d9bb3aec277a80b3.tar.bz2
mpv-2632ea3de618bc8b1e533260d9bb3aec277a80b3.tar.xz
msg, client API: never send the status line as log message
The status line is a bit special; for example it uses special control codes by design and is not terminated with a newline character in order to update it on the terminal without scrolling. It's not helpful for client API users either, and would require special-casing them (emulating aspects of a terminal?). Also, the status line code is explicitly disabled on osd.c unless the --terminal option is enabled, so there was no good way to even enable the status line for the API. Just pretend that the status line does not exist as far as the client API is concerned. It won't be sent as MPV_EVENT_LOG_MESSAGE.
Diffstat (limited to 'common')
-rw-r--r--common/msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c
index 21fae360be..53b45af364 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -304,7 +304,7 @@ static void write_msg_to_buffers(struct mp_log *log, int lev, char *text)
struct mp_log_root *root = log->root;
for (int n = 0; n < root->num_buffers; n++) {
struct mp_log_buffer *buffer = root->buffers[n];
- if (lev <= buffer->level) {
+ if (lev <= buffer->level && lev != MSGL_STATUS) {
// Assuming a single writer (serialized by msg lock)
int avail = mp_ring_available(buffer->ring) / sizeof(void *);
if (avail < 1)