impl-link: both ports need to be negotiated before we can allocate

Fix allocation check. Both ports need to be at least negotiated before
we can attempt to allocate buffers.
This commit is contained in:
Wim Taymans 2021-10-26 10:13:21 +02:00
parent cd3bd825c1
commit ba18768246

View file

@ -486,7 +486,7 @@ static int do_allocation(struct pw_impl_link *this)
pw_log_debug("%p: out-state:%d in-state:%d", this, output->state, input->state);
if (input->state != PW_IMPL_PORT_STATE_READY && output->state != PW_IMPL_PORT_STATE_READY)
if (input->state < PW_IMPL_PORT_STATE_READY || output->state < PW_IMPL_PORT_STATE_READY)
return 0;
link_update_state(this, PW_LINK_STATE_ALLOCATING, 0, NULL);