mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-09 23:50:15 -04:00
sendspin: handle parse_player errors
Otherwise, this might leave the stride 0 and cause a division by 0 later.
This commit is contained in:
parent
5b37b9cf99
commit
22243d5ce9
1 changed files with 3 additions and 1 deletions
|
|
@ -777,10 +777,12 @@ static int handle_stream_start(struct client *client, struct spa_json *payload)
|
|||
|
||||
while ((l = spa_json_object_next(payload, key, sizeof(key), &v)) > 0) {
|
||||
if (spa_streq(key, "player")) {
|
||||
int res;
|
||||
if (!spa_json_is_object(v, l))
|
||||
return -EPROTO;
|
||||
spa_json_enter(payload, &it[0]);
|
||||
parse_player(client, &it[0]);
|
||||
if ((res = parse_player(client, &it[0])) < 0)
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue