From bf33ce3fc0c36514c571877bf97f993a747015e6 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 29 Jan 2019 12:04:31 +0100 Subject: [PATCH] link: don't call use_buffers after alloc_buffers --- src/pipewire/link.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pipewire/link.c b/src/pipewire/link.c index 47d4a0680..c30556fb3 100644 --- a/src/pipewire/link.c +++ b/src/pipewire/link.c @@ -541,7 +541,7 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s uint32_t in_flags, out_flags; char *error = NULL; struct pw_port *input, *output; - struct allocation allocation; + struct allocation allocation = { NULL, }; uint32_t in_mix_state, out_mix_state; in_mix_state = this->rt.in_mix.state; @@ -690,6 +690,7 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s pw_work_queue_add(impl->work, output->node, res, complete_paused, &this->rt.out_mix); + out_flags &= ~SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS; move_allocation(&allocation, &output->allocation); pw_log_debug("link %p: allocated %d buffers %p from output port", this, @@ -707,6 +708,7 @@ static int do_allocation(struct pw_link *this, uint32_t in_state, uint32_t out_s pw_work_queue_add(impl->work, input->node, res, complete_paused, &this->rt.in_mix); + in_flags &= ~SPA_PORT_INFO_FLAG_CAN_USE_BUFFERS; pw_log_debug("link %p: allocated %d buffers %p from input port", this, allocation.n_buffers, allocation.buffers); }