pa_xfree(e->description);
pa_xfree(e->icon);
+ pa_xfree(e);
}
static pa_bool_t entry_write(struct userdata *u, const char *name, const struct entry *e) {
t != (PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE))
return;
- entry = entry_new();
-
if ((t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK_INPUT) {
pa_sink_input *si;
if (!(sink = pa_idxset_get_by_index(c->sinks, idx)))
return;
+ entry = entry_new();
name = pa_sprintf_malloc("sink:%s", sink->name);
old = load_or_initialize_entry(u, entry, name, "sink:");
if (source->monitor_of)
return;
+ entry = entry_new();
name = pa_sprintf_malloc("source:%s", source->name);
old = load_or_initialize_entry(u, entry, name, "source:");
pa_xfree(entry->icon);
entry->icon = pa_xstrdup(pa_proplist_gets(source->proplist, PA_PROP_DEVICE_ICON_NAME));
+ } else {
+ pa_assert_not_reached();
}
pa_assert(name);
u->sink_memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
if (!u->sink_memblockq) {
+ pa_sink_new_data_done(&sink_data);
pa_log("Failed to create sink memblockq.");
goto fail;
}
pa_sink_put(u->sink);
} else {
+ pa_sink_new_data_done(&sink_data);
/* optional uplink sink not enabled */
u->sink = NULL;
}