summaryrefslogtreecommitdiffstats
path: root/common/msg_control.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2024-01-26 11:28:37 +0100
committersfan5 <sfan5@live.de>2024-01-27 10:04:16 +0100
commitdcf8adf28967cb138ece45d0f383d3e83f14f826 (patch)
tree90d9c6e46425fb2eca5878b0bda1be2e738fe9f9 /common/msg_control.h
parentc08e626578863e5f4da93d20566ad01fc6210365 (diff)
downloadmpv-dcf8adf28967cb138ece45d0f383d3e83f14f826.tar.bz2
mpv-dcf8adf28967cb138ece45d0f383d3e83f14f826.tar.xz
common: don't force terminal log buffer to small size
Using the 'terminal-default' log level a client can request to get all messages that would normally appear on the terminal. 8c2d73f112055a9e52e5bda4934c2ac90e31def7 changed the size of the relevant buffer to 100 lines, which was prone to quickly overflowing once you enable verbose or debug output. This size is kept for the early terminal buffer but now enlarged once a client actually requests this log level. This fixes the overflow risk while not consuming more resources if this feature is unused.
Diffstat (limited to 'common/msg_control.h')
-rw-r--r--common/msg_control.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/msg_control.h b/common/msg_control.h
index 0b52ce5a00..ee02eb297b 100644
--- a/common/msg_control.h
+++ b/common/msg_control.h
@@ -35,6 +35,7 @@ struct mp_log_buffer *mp_msg_log_buffer_new(struct mpv_global *global,
void *wakeup_cb_ctx);
void mp_msg_log_buffer_destroy(struct mp_log_buffer *buffer);
struct mp_log_buffer_entry *mp_msg_log_buffer_read(struct mp_log_buffer *buffer);
+void mp_msg_log_buffer_resize(struct mp_log_buffer *buffer, int size);
void mp_msg_log_buffer_set_silent(struct mp_log_buffer *buffer, bool silent);
int mp_msg_find_level(const char *s);