mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: warn out of buffers
Running out of buffers is pretty bad and warrants a warning because it can cause loss of audio. See #3316
This commit is contained in:
parent
21d16b1ad5
commit
baa5497617
4 changed files with 12 additions and 6 deletions
|
|
@ -2298,8 +2298,9 @@ static inline struct buffer *peek_buffer(struct impl *this, struct port *port)
|
|||
struct buffer *b;
|
||||
|
||||
if (spa_list_is_empty(&port->queue)) {
|
||||
spa_log_trace_fp(this->log, "%p: out of buffers on port %d %d",
|
||||
this, port->id, port->n_buffers);
|
||||
if (port->n_buffers > 0)
|
||||
spa_log_warn(this->log, "%p: out of buffers on port %d %d",
|
||||
this, port->id, port->n_buffers);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -786,8 +786,9 @@ static int impl_node_process(void *object)
|
|||
|
||||
outb = dequeue_buffer(this, outport);
|
||||
if (SPA_UNLIKELY(outb == NULL)) {
|
||||
spa_log_trace(this->log, "%p: out of buffers (%d)", this,
|
||||
outport->n_buffers);
|
||||
if (outport->n_buffers > 0)
|
||||
spa_log_warn(this->log, "%p: out of buffers (%d)", this,
|
||||
outport->n_buffers);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -722,7 +722,9 @@ static int impl_node_process(void *object)
|
|||
|
||||
outb = dequeue_buffer(this, outport);
|
||||
if (SPA_UNLIKELY(outb == NULL)) {
|
||||
spa_log_trace(this->log, "%p: out of buffers", this);
|
||||
if (outport->n_buffers > 0)
|
||||
spa_log_warn(this->log, "%p: out of buffers (%d)", this,
|
||||
outport->n_buffers);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -623,7 +623,9 @@ static int impl_node_process(void *object)
|
|||
|
||||
/* get output buffer */
|
||||
if ((outb = dequeue_buffer(this, outport)) == NULL) {
|
||||
spa_log_trace(this->log, NAME " %p: out of buffers", this);
|
||||
if (outport->n_buffers > 0)
|
||||
spa_log_warn(this->log, NAME " %p: out of buffers (%d)",
|
||||
this, outport->n_buffers);
|
||||
return -EPIPE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue