handle NULL latency param

Fixes #3504
This commit is contained in:
Wim Taymans 2023-09-13 11:13:48 +02:00
parent 56786aedc4
commit b094057b0b
12 changed files with 20 additions and 13 deletions

View file

@ -604,7 +604,7 @@ static void input_param_latency_changed(struct impl *impl, const struct spa_pod
struct spa_pod_builder b;
const struct spa_pod *params[1];
if (spa_latency_parse(param, &latency) < 0)
if (param == NULL || spa_latency_parse(param, &latency) < 0)
return;
spa_pod_builder_init(&b, buffer, sizeof(buffer));
@ -767,7 +767,7 @@ static void output_param_latency_changed(struct impl *impl, const struct spa_pod
struct spa_pod_builder b;
const struct spa_pod *params[1];
if (spa_latency_parse(param, &latency) < 0)
if (param == NULL || spa_latency_parse(param, &latency) < 0)
return;
spa_pod_builder_init(&b, buffer, sizeof(buffer));