media-session: only check passthrough when available

When none of the nodes have a valid passthrough format, don't check if
passthrough is possible.

Without the check, it is possible that a node has a common format with
the peer that is not a passthrough format, like a raw audio format.

Fixes #1587
This commit is contained in:
Wim Taymans 2021-09-09 16:24:04 +02:00
parent 954befccff
commit 67be26aac7

View file

@ -217,6 +217,9 @@ static bool check_passthrough(struct node *node, struct node *peer)
if (peer->obj->info->state == PW_NODE_STATE_RUNNING)
return false;
if (!node->have_passthrough || !peer->have_passthrough)
return false;
spa_list_for_each(p1, &node->obj->param_list, link) {
if (p1->id != SPA_PARAM_EnumFormat)
continue;