mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-02-04 05:00:26 +01:00
m-mixer-api: make sure the enum param iterator is valid
Some audio nodes such as null-audio-sink nodes don't support Props or Route enum params.
This commit is contained in:
parent
188a10e0e7
commit
fc41af5c98
1 changed files with 2 additions and 2 deletions
|
|
@ -191,7 +191,7 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
|
|||
g_auto (GValue) val = G_VALUE_INIT;
|
||||
|
||||
it = wp_pipewire_object_enum_params_sync (dev, "Route", NULL);
|
||||
for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
|
||||
for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) {
|
||||
WpSpaPod *param = g_value_get_boxed (&val);
|
||||
gint32 r_index = -1, r_device = -1;
|
||||
g_autoptr (WpSpaPod) props = NULL;
|
||||
|
|
@ -220,7 +220,7 @@ collect_node_info (WpMixerApi * self, struct node_info *info,
|
|||
g_auto (GValue) val = G_VALUE_INIT;
|
||||
|
||||
it = wp_pipewire_object_enum_params_sync (node, "Props", NULL);
|
||||
for (; wp_iterator_next (it, &val); g_value_unset (&val)) {
|
||||
for (; it && wp_iterator_next (it, &val); g_value_unset (&val)) {
|
||||
WpSpaPod *param = g_value_get_boxed (&val);
|
||||
if (node_info_fill (info, param))
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue