mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
Improve pod filter
Reset the builder when the filter failed. Make the plugins create their params in a temporary buffer, we don't want to do in-place filtering because that is not always possible. Because the filter now resets on error, we can remove the reset from the plugins.
This commit is contained in:
parent
7a7c011b00
commit
52e1dad93e
15 changed files with 193 additions and 226 deletions
|
|
@ -119,7 +119,7 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
int err, i, j, dir;
|
||||
unsigned int min, max;
|
||||
uint8_t buffer[4096];
|
||||
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, sizeof(buffer));
|
||||
struct spa_pod_builder b = { 0 };
|
||||
struct spa_pod_prop *prop;
|
||||
struct spa_pod *fmt;
|
||||
int res;
|
||||
|
|
@ -130,6 +130,8 @@ spa_alsa_enum_format(struct state *state, uint32_t *index,
|
|||
return err;
|
||||
|
||||
next:
|
||||
spa_pod_builder_init(&b, buffer, sizeof(buffer));
|
||||
|
||||
if (*index > 0)
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue