summaryrefslogtreecommitdiffstats
path: root/common/msg.c
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2023-01-23 10:56:12 +0200
committeravih <avih@users.noreply.github.com>2023-01-23 11:05:08 +0200
commit17baa00e028367898c5a91127d71c3a3487b427a (patch)
treecd54c15dd71776411d0d4f89184f4f3db412a093 /common/msg.c
parent92a6f2d687e90452c9080a2e0b471ced7557518f (diff)
downloadmpv-17baa00e028367898c5a91127d71c3a3487b427a.tar.bz2
mpv-17baa00e028367898c5a91127d71c3a3487b427a.tar.xz
msg: log-file buffer size: don't use magic number (no-op)
Diffstat (limited to 'common/msg.c')
-rw-r--r--common/msg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/msg.c b/common/msg.c
index faf1059490..256456e3a6 100644
--- a/common/msg.c
+++ b/common/msg.c
@@ -43,7 +43,9 @@
#include "msg.h"
#include "msg_control.h"
+// log buffer size (lines) for terminal level and logfile level
#define TERM_BUF 100
+#define FILE_BUF 100
struct mp_log_root {
struct mpv_global *global;
@@ -642,7 +644,7 @@ void mp_msg_update_msglevels(struct mpv_global *global, struct MPOpts *opts)
root->log_file = fopen(root->log_path, "wb");
if (root->log_file) {
root->log_file_buffer =
- mp_msg_log_buffer_new(global, 100, MP_LOG_BUFFER_MSGL_LOGFILE,
+ mp_msg_log_buffer_new(global, FILE_BUF, MP_LOG_BUFFER_MSGL_LOGFILE,
wakeup_log_file, root);
root->log_file_thread_active = true;
if (pthread_create(&root->log_file_thread, NULL, log_file_thread,