mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-27 07:58:16 -04:00
impl-link: log error when activate fails
This commit is contained in:
parent
271f2d855d
commit
abb28e5255
1 changed files with 10 additions and 7 deletions
|
|
@ -686,14 +686,10 @@ int pw_impl_link_activate(struct pw_impl_link *this)
|
||||||
|
|
||||||
if ((res = port_set_io(this, this->input, SPA_IO_Buffers, this->io,
|
if ((res = port_set_io(this, this->input, SPA_IO_Buffers, this->io,
|
||||||
sizeof(struct spa_io_buffers), &this->rt.in_mix)) < 0)
|
sizeof(struct spa_io_buffers), &this->rt.in_mix)) < 0)
|
||||||
return res;
|
goto error;
|
||||||
|
|
||||||
if ((res = port_set_io(this, this->output, SPA_IO_Buffers, this->io,
|
if ((res = port_set_io(this, this->output, SPA_IO_Buffers, this->io,
|
||||||
sizeof(struct spa_io_buffers), &this->rt.out_mix)) < 0) {
|
sizeof(struct spa_io_buffers), &this->rt.out_mix)) < 0)
|
||||||
port_set_io(this, this->input, SPA_IO_Buffers, NULL, 0,
|
goto error_clean;
|
||||||
&this->rt.in_mix);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
pw_loop_invoke(this->output->node->data_loop,
|
pw_loop_invoke(this->output->node->data_loop,
|
||||||
do_activate_link, SPA_ID_INVALID, NULL, 0, false, this);
|
do_activate_link, SPA_ID_INVALID, NULL, 0, false, this);
|
||||||
|
|
@ -703,7 +699,14 @@ int pw_impl_link_activate(struct pw_impl_link *this)
|
||||||
link_update_state(this, PW_LINK_STATE_ACTIVE, 0, NULL);
|
link_update_state(this, PW_LINK_STATE_ACTIVE, 0, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
error_clean:
|
||||||
|
port_set_io(this, this->input, SPA_IO_Buffers, NULL, 0, &this->rt.in_mix);
|
||||||
|
error:
|
||||||
|
pw_log_error("%p: can't activate link: %s", this, spa_strerror(res));
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void check_states(void *obj, void *user_data, int res, uint32_t id)
|
static void check_states(void *obj, void *user_data, int res, uint32_t id)
|
||||||
{
|
{
|
||||||
struct pw_impl_link *this = obj;
|
struct pw_impl_link *this = obj;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue