mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
impl-link: don't clear ouput buffers in all cases
When we can't set the allocated buffers on the input port, don't clear the buffers because they might be in use by the output port. Fixes #1078
This commit is contained in:
parent
01f2c91b89
commit
bf5d40434d
1 changed files with 3 additions and 2 deletions
|
|
@ -461,7 +461,7 @@ static int do_allocation(struct pw_impl_link *this)
|
|||
output->buffers.n_buffers)) < 0) {
|
||||
error = spa_aprintf("error use output buffers: %d (%s)", res,
|
||||
spa_strerror(res));
|
||||
goto error;
|
||||
goto error_clear;
|
||||
}
|
||||
if (SPA_RESULT_IS_ASYNC(res)) {
|
||||
res = spa_node_sync(output->node->node, res),
|
||||
|
|
@ -494,8 +494,9 @@ static int do_allocation(struct pw_impl_link *this)
|
|||
}
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error_clear:
|
||||
pw_buffers_clear(&output->buffers);
|
||||
error:
|
||||
link_update_state(this, PW_LINK_STATE_ERROR, res, error);
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue