jack: use empty area when get_buffer frames is 0

Client that call port_get_buffer with 0 frames get the empty scratch
buffer because we can't know the final output size.
This commit is contained in:
Wim Taymans 2020-08-11 12:09:50 +02:00
parent 753af7c7b3
commit f73a0c97e3

View file

@ -806,6 +806,9 @@ static void *get_buffer_output(struct client *c, struct port *p, uint32_t frames
p->io.status = -EPIPE; p->io.status = -EPIPE;
p->io.buffer_id = SPA_ID_INVALID; p->io.buffer_id = SPA_ID_INVALID;
if (frames == 0)
return NULL;
if (SPA_LIKELY((mix = find_mix(c, p, -1)) != NULL)) { if (SPA_LIKELY((mix = find_mix(c, p, -1)) != NULL)) {
struct buffer *b; struct buffer *b;