if (u->version >= 21) {
uint8_t n_formats;
- pa_format_info format;
+ pa_format_info *format;
if (pa_tagstruct_getu8(t, &n_formats) < 0) { /* no. of formats */
pa_log("Parse failure");
}
for (uint8_t j = 0; j < n_formats; j++) {
- if (pa_tagstruct_get_format_info(t, &format)) { /* format info */
+ format = pa_format_info_new();
+ if (pa_tagstruct_get_format_info(t, format)) { /* format info */
+ pa_format_info_free(format);
pa_log("Parse failure");
goto fail;
}
+ pa_format_info_free(format);
}
}
}
if (u->version >= 21) {
- pa_format_info format;
-
- if (pa_tagstruct_get_format_info(t, &format) < 0) {
+ pa_format_info *format = pa_format_info_new();
+ if (pa_tagstruct_get_format_info(t, format) < 0) {
+ pa_format_info_free(format);
pa_log("Parse failure");
goto fail;
}
+ pa_format_info_free(format);
}
if (!pa_tagstruct_eof(t)) {
}
if (u->version >= 21) {
- pa_format_info format;
+ pa_format_info *format = pa_format_info_new();
- if (pa_tagstruct_get_format_info(t, &format) < 0)
+ if (pa_tagstruct_get_format_info(t, format) < 0) {
+ pa_format_info_free(format);
goto parse_error;
+ }
+
+ pa_format_info_free(format);
}
if (!pa_tagstruct_eof(t))
#ifdef TUNNEL_SINK
if (u->version >= 21) {
/* We're not using the extended API, so n_formats = 0 and that's that */
- pa_tagstruct_putu8(t, 0);
+ pa_tagstruct_putu8(reply, 0);
}
#endif