mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: add spa_json_begin
That combines spa_json_init() and spa_json_next, a common thing to do.
This commit is contained in:
parent
08057e0328
commit
feccb882b6
7 changed files with 15 additions and 18 deletions
|
|
@ -1122,8 +1122,7 @@ static int parse_value(const char *str, struct param_info *info)
|
|||
const char *val;
|
||||
int len;
|
||||
|
||||
spa_json_init(&it[0], str, strlen(str));
|
||||
if ((len = spa_json_next(&it[0], &val)) <= 0)
|
||||
if ((len = spa_json_begin(&it[0], str, strlen(str), &val)) <= 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (spa_json_is_array(val, len)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue