pa_cvolume volume;
pa_bool_t mute;
pa_usec_t latency;
- pa_proplist *pl;
pa_assert(pd);
pa_assert(u);
- pl = pa_proplist_new();
-
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
if (u->version >= 13) {
pa_usec_t configured_latency;
- if (pa_tagstruct_get_proplist(t, pl) < 0 ||
+ if (pa_tagstruct_get_proplist(t, NULL) < 0 ||
pa_tagstruct_get_usec(t, &configured_latency) < 0) {
pa_log("Parse failure");
goto fail;
}
- pa_proplist_free(pl);
-
if (!u->sink_name || !pa_streq(name, u->sink_name))
return;
fail:
pa_module_unload_request(u->module, TRUE);
- pa_proplist_free(pl);
}
/* Called from main context */
pa_sample_spec sample_spec;
pa_channel_map channel_map;
pa_cvolume volume;
- pa_proplist *pl;
pa_bool_t b;
pa_assert(pd);
pa_assert(u);
- pl = pa_proplist_new();
-
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
}
if (u->version >= 13) {
- if (pa_tagstruct_get_proplist(t, pl) < 0) {
+ if (pa_tagstruct_get_proplist(t, NULL) < 0) {
pa_log("Parse failure");
goto fail;
goto fail;
}
- pa_proplist_free(pl);
-
if (idx != u->device_index)
return;
fail:
pa_module_unload_request(u->module, TRUE);
- pa_proplist_free(pl);
}
#else
pa_cvolume volume;
pa_bool_t mute;
pa_usec_t latency, configured_latency;
- pa_proplist *pl;
pa_assert(pd);
pa_assert(u);
- pl = pa_proplist_new();
-
if (command != PA_COMMAND_REPLY) {
if (command == PA_COMMAND_ERROR)
pa_log("Failed to get info.");
}
if (u->version >= 13) {
- if (pa_tagstruct_get_proplist(t, pl) < 0 ||
+ if (pa_tagstruct_get_proplist(t, NULL) < 0 ||
pa_tagstruct_get_usec(t, &configured_latency) < 0) {
pa_log("Parse failure");
goto fail;
}
- pa_proplist_free(pl);
-
if (!u->source_name || !pa_streq(name, u->source_name))
return;
fail:
pa_module_unload_request(u->module, TRUE);
- pa_proplist_free(pl);
}
#endif
size_t saved_rindex;
pa_assert(t);
- pa_assert(p);
if (t->rindex+1 > t->length)
return -1;
if (!k)
break;
+ if (!pa_proplist_key_valid(k))
+ goto fail;
+
if (pa_tagstruct_getu32(t, &length) < 0)
goto fail;
if (pa_tagstruct_get_arbitrary(t, &d, length) < 0)
goto fail;
- if (pa_proplist_set(p, k, d, length) < 0)
- goto fail;
+ if (p)
+ pa_assert_se(pa_proplist_set(p, k, d, length) >= 0);
}
return 0;