audioadapter: fix recalc_tag ParamTag direction filter

ParamTag on a port describes the peer direction, matching audioconvert port_set_tag.
recalc_tag used info.direction == direction and could skip valid tags or forward the wrong param to the follower.
Use SPA_DIRECTION_REVERSE(direction) when selecting the enumerated tag.

Apply the same fix in videoadapter for videoconvert.
This commit is contained in:
zuozhiwei 2026-04-23 10:42:14 +08:00 committed by Wim Taymans
parent bb9d306399
commit f3e1378d41
2 changed files with 2 additions and 2 deletions

View file

@ -725,7 +725,7 @@ static int recalc_tag(struct impl *this, struct spa_node *src, enum spa_directio
}
if ((res = spa_tag_parse(param, &info, &tag_state)) < 0)
return res;
if (info.direction == direction)
if (info.direction == SPA_DIRECTION_REVERSE(direction))
break;
}
return spa_node_port_set_param(dst, SPA_DIRECTION_REVERSE(direction), 0,