stream: handle out of buffers port

If the port was out of buffers and we can't recycle a buffer, return
-EPIPE.
This commit is contained in:
Wim Taymans 2020-09-25 18:24:29 +02:00
parent 013e94ee4e
commit 79fbddb838

View file

@ -763,7 +763,8 @@ static int impl_node_process_input(void *object)
/* pop buffer to recycle */
if ((b = pop_queue(impl, &impl->queued))) {
pw_log_trace(NAME" %p: recycle buffer %d", stream, b->id);
}
} else if (io->status == -EPIPE)
return io->status;
io->buffer_id = b ? b->id : SPA_ID_INVALID;
io->status = SPA_STATUS_NEED_DATA;
}