From dcf8adf28967cb138ece45d0f383d3e83f14f826 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 26 Jan 2024 11:28:37 +0100 Subject: 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. --- common/msg_control.h | 1 + 1 file changed, 1 insertion(+) (limited to 'common/msg_control.h') 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); -- cgit v1.2.3