[pulseaudio-discuss] [PATCH] module-loopback: Reset callbacks in teardown
david.henningsson at canonical.com
Tue Apr 3 23:10:27 PDT 2012
On 04/04/2012 07:20 AM, Tanu Kaskinen wrote:
> On Tue, 2012-04-03 at 19:03 +0200, David Henningsson wrote:
>> Make sure we can't be called into by remaining references to
>> sink-inputs and source-outputs after we have teared down, as
>> that will likely lead to segfaults or assertion failures.
>> Signed-off-by: David Henningsson<david.henningsson at canonical.com>
>> This is a continuation of the "loopback: Fix crash if max request change at
>> unload" thread. Not sure if this makes sense, it probably does, but I have not
>> verified how the core will react when all of these are NULL, so won't push without
>> additional comments/acks.
>> Frederic, it would be nice to know if this improves your situation as well.
> pa_sink_input_unlink() already resets the callbacks.
Ok, that's good. However, looking at it a bit closer, the most important
one is not reset in the reset_callbacks:
u->sink_input->parent.process_msg = NULL;
or, perhaps even better:
u->sink_input->parent.process_msg = pa_sink_input_process_msg;
Perhaps it would make sense to put the above into teardown()?
> Did my suggestion
> of a one-line fix get any consideration?
Hmm, I don't understand how your suggestion could make a difference - at
least now with the patch I pushed, adjust_time is set to zero at the
same time as the sink is unlinked.
(Sorry for misspelling your email, btw)
David Henningsson, Canonical Ltd.
More information about the pulseaudio-discuss