mirror of https://github.com/mpv-player/mpv
msg: set an explicit overflow message
So client API users don't have to worry about this specifically. Also document the overflow case. (Not sure if we really need to do this; maybe it'd be better not to, since this just adds more noise to the docs.)
This commit is contained in:
parent
014547bdc2
commit
046ad8c5ae
|
@ -321,7 +321,7 @@ static void write_msg_to_buffers(struct mp_log *log, int lev, char *text)
|
||||||
*entry = (struct mp_log_buffer_entry) {
|
*entry = (struct mp_log_buffer_entry) {
|
||||||
.prefix = "overflow",
|
.prefix = "overflow",
|
||||||
.level = MSGL_FATAL,
|
.level = MSGL_FATAL,
|
||||||
.text = "",
|
.text = "log message buffer overflow\n",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
mp_ring_write(buffer->ring, (unsigned char *)&entry, sizeof(entry));
|
mp_ring_write(buffer->ring, (unsigned char *)&entry, sizeof(entry));
|
||||||
|
|
|
@ -1032,7 +1032,10 @@ typedef struct mpv_event_property {
|
||||||
|
|
||||||
typedef struct mpv_event_log_message {
|
typedef struct mpv_event_log_message {
|
||||||
/**
|
/**
|
||||||
* The module prefix, identifies the sender of the message.
|
* The module prefix, identifies the sender of the message. As a special
|
||||||
|
* case, if the message buffer overflows, this will be set to the string
|
||||||
|
* "overflow" (which doesn't appear as prefix otherwise), and the text
|
||||||
|
* field will contain an informative message.
|
||||||
*/
|
*/
|
||||||
const char *prefix;
|
const char *prefix;
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue