o->thread_info.direct_on_input = NULL;
}
- if (pa_hashmap_remove(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index)))
- pa_source_output_unref(o);
-
+ pa_hashmap_remove_and_free(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index));
pa_source_invalidate_requested_latency(s, true);
/* In flat volume mode we need to update the volume as