mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
Assume that the profiles hashmap of ports is always non-NULL.
It's a valid assumption nowadays, because the hashmap is created in pa_device_port_new().
This commit is contained in:
parent
12af302ac7
commit
d184b54d7c
2 changed files with 44 additions and 46 deletions
|
|
@ -3261,6 +3261,8 @@ static void card_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_car
|
|||
pa_tagstruct_putu32(t, pa_hashmap_size(card->ports));
|
||||
|
||||
PA_HASHMAP_FOREACH(port, card->ports, state) {
|
||||
void *state2;
|
||||
|
||||
pa_tagstruct_puts(t, port->name);
|
||||
pa_tagstruct_puts(t, port->description);
|
||||
pa_tagstruct_putu32(t, port->priority);
|
||||
|
|
@ -3268,13 +3270,10 @@ static void card_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_car
|
|||
pa_tagstruct_putu8(t, /* FIXME: port->direction */ (port->is_input ? PA_DIRECTION_INPUT : 0) | (port->is_output ? PA_DIRECTION_OUTPUT : 0));
|
||||
pa_tagstruct_put_proplist(t, port->proplist);
|
||||
|
||||
if (port->profiles) {
|
||||
void* state2;
|
||||
pa_tagstruct_putu32(t, pa_hashmap_size(port->profiles));
|
||||
PA_HASHMAP_FOREACH(p, port->profiles, state2)
|
||||
pa_tagstruct_puts(t, p->name);
|
||||
} else
|
||||
pa_tagstruct_putu32(t, 0);
|
||||
pa_tagstruct_putu32(t, pa_hashmap_size(port->profiles));
|
||||
|
||||
PA_HASHMAP_FOREACH(p, port->profiles, state2)
|
||||
pa_tagstruct_puts(t, p->name);
|
||||
}
|
||||
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue