mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
pod-builder: move some code around to help gcc 13
Make sure to pop the frame before returning errors to stop gcc13 from complaining with -Wdangling-pointer Fixes #3171
This commit is contained in:
parent
83d2e85f49
commit
0333ddff45
6 changed files with 22 additions and 19 deletions
|
|
@ -1062,6 +1062,10 @@ static int enum_pcm_formats(struct state *state, uint32_t index, uint32_t *next,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (j > 1)
|
||||
choice->body.type = SPA_CHOICE_Enum;
|
||||
spa_pod_builder_pop(b, &f[1]);
|
||||
|
||||
if (j == 0) {
|
||||
char buf[1024];
|
||||
int i, r, offs;
|
||||
|
|
@ -1090,9 +1094,6 @@ static int enum_pcm_formats(struct state *state, uint32_t index, uint32_t *next,
|
|||
spa_log_warn(state->log, "%s: access:%s", state->props.device, buf);
|
||||
return -ENOTSUP;
|
||||
}
|
||||
if (j > 1)
|
||||
choice->body.type = SPA_CHOICE_Enum;
|
||||
spa_pod_builder_pop(b, &f[1]);
|
||||
|
||||
if ((res = add_rate(state, 1, 1, false, index & 0xffff, next, 0, params, b)) != 1)
|
||||
return res;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue