sendspin: handle parse_player errors

Otherwise, this might leave the stride 0 and cause a division by 0
later.
This commit is contained in:
Wim Taymans 2026-05-08 10:32:28 +02:00
parent 5b37b9cf99
commit 22243d5ce9

View file

@ -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;
}
}