mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-18 08:56:40 -05:00
introspect: Fix a bug in sink/source info protocol handling related to ports.
Previously the active_profile was extracted from the tagstruct regardless of the protocol version which caused errors while speaking to older version servers.
This commit is contained in:
parent
a007d4740f
commit
59376b039e
1 changed files with 62 additions and 58 deletions
|
|
@ -201,6 +201,7 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (o->context->version >= 16) {
|
||||
if (i.n_ports > 0) {
|
||||
i.ports = pa_xnew(pa_sink_port_info*, i.n_ports+1);
|
||||
i.ports[0] = pa_xnew(pa_sink_port_info, i.n_ports);
|
||||
|
|
@ -238,6 +239,7 @@ static void context_get_sink_info_callback(pa_pdispatch *pd, uint32_t command, u
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i.mute = (int) mute;
|
||||
i.flags = (pa_sink_flags_t) flags;
|
||||
|
|
@ -428,6 +430,7 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (o->context->version >= 16) {
|
||||
if (i.n_ports > 0) {
|
||||
i.ports = pa_xnew(pa_source_port_info*, i.n_ports+1);
|
||||
i.ports[0] = pa_xnew(pa_source_port_info, i.n_ports);
|
||||
|
|
@ -465,6 +468,7 @@ static void context_get_source_info_callback(pa_pdispatch *pd, uint32_t command,
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
i.mute = (int) mute;
|
||||
i.flags = (pa_source_flags_t) flags;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue