mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
tunnel: fix parsing of source info from newer servers
This commit is contained in:
parent
592345fd36
commit
c194db71b0
1 changed files with 29 additions and 2 deletions
|
|
@ -1070,7 +1070,7 @@ static void sink_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_t
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->version >= 16) {
|
if (u->version >= 16) {
|
||||||
uint32_t n_ports, j;
|
uint32_t n_ports;
|
||||||
const char *s;
|
const char *s;
|
||||||
|
|
||||||
if (pa_tagstruct_getu32(t, &n_ports)) {
|
if (pa_tagstruct_getu32(t, &n_ports)) {
|
||||||
|
|
@ -1078,7 +1078,7 @@ static void sink_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_t
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < n_ports; j++) {
|
for (uint32_t j = 0; j < n_ports; j++) {
|
||||||
uint32_t priority;
|
uint32_t priority;
|
||||||
|
|
||||||
if (pa_tagstruct_gets(t, &s) < 0 || /* name */
|
if (pa_tagstruct_gets(t, &s) < 0 || /* name */
|
||||||
|
|
@ -1272,6 +1272,33 @@ static void source_info_cb(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (u->version >= 16) {
|
||||||
|
uint32_t n_ports;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
if (pa_tagstruct_getu32(t, &n_ports)) {
|
||||||
|
pa_log("Parse failure");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint32_t j = 0; j < n_ports; j++) {
|
||||||
|
uint32_t priority;
|
||||||
|
|
||||||
|
if (pa_tagstruct_gets(t, &s) < 0 || /* name */
|
||||||
|
pa_tagstruct_gets(t, &s) < 0 || /* description */
|
||||||
|
pa_tagstruct_getu32(t, &priority) < 0) {
|
||||||
|
|
||||||
|
pa_log("Parse failure");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pa_tagstruct_gets(t, &s) < 0) { /* active port */
|
||||||
|
pa_log("Parse failure");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!pa_tagstruct_eof(t)) {
|
if (!pa_tagstruct_eof(t)) {
|
||||||
pa_log("Packet too long");
|
pa_log("Packet too long");
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue