For example, in file "module-suspend-on-idle.c ", why does the slot function
"sink_input_state_changed_hook_cb" only reference the sink input but never
unreference it?
So the reference count of the sink input will only increase? Does it matter?
Here is the code:
static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c,
pa_sink_input *s, struct userdata *u) {
struct device_info *d;
pa_sink_input_state_t state;
pa_assert(c);
pa_sink_input_assert_ref(s); ... the sink input is referenced here. But
where pa_sink_input_unref(s) is called?
pa_assert(u);
state = pa_sink_input_get_state(s);
if (state == PA_SINK_INPUT_RUNNING || state == PA_SINK_INPUT_DRAINED)
if ((d = pa_hashmap_get(u->device_infos, s->sink)))
resume(d);
return PA_HOOK_OK;
}
Thanks
Amanda
_______________________________________________
pulseaudio-discuss mailing list
[email protected]
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss