mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-30 21:37:53 -04:00
filter-graph: error when there are no valid nodes
The nodes might have failed to load or there was an empty array or the array did not contain objects.
This commit is contained in:
parent
c91e9ded7d
commit
0b11792194
2 changed files with 5 additions and 2 deletions
|
|
@ -2204,6 +2204,10 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
|
|||
if ((res = load_node(graph, &it[1])) < 0)
|
||||
return res;
|
||||
}
|
||||
if (spa_list_is_empty(&graph->node_list)) {
|
||||
spa_log_error(impl->log, "filter.graph has no nodes");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (plinks != NULL) {
|
||||
while (spa_json_enter_object(plinks, &it[1]) > 0) {
|
||||
if ((res = parse_link(graph, &it[1])) < 0)
|
||||
|
|
@ -2256,7 +2260,6 @@ static int load_graph(struct graph *graph, const struct spa_dict *props)
|
|||
else
|
||||
graph->default_outputs = last->desc->n_output;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue