mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
module-loopback: Reset process_msg callbacks in teardown
Make sure we can't be called into by remaining references to sink-inputs and source-outputs after we have unloaded, as that will likely lead to segfaults. Thanks to Tanu for providing valuable input on this patch. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
b762f4eef1
commit
e815a1f81a
1 changed files with 2 additions and 0 deletions
|
|
@ -152,11 +152,13 @@ static void teardown(struct userdata *u) {
|
||||||
pa_source_output_unlink(u->source_output);
|
pa_source_output_unlink(u->source_output);
|
||||||
|
|
||||||
if (u->sink_input) {
|
if (u->sink_input) {
|
||||||
|
u->sink_input->parent.process_msg = pa_sink_input_process_msg;
|
||||||
pa_sink_input_unref(u->sink_input);
|
pa_sink_input_unref(u->sink_input);
|
||||||
u->sink_input = NULL;
|
u->sink_input = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u->source_output) {
|
if (u->source_output) {
|
||||||
|
u->source_output->parent.process_msg = pa_source_output_process_msg;
|
||||||
pa_source_output_unref(u->source_output);
|
pa_source_output_unref(u->source_output);
|
||||||
u->source_output = NULL;
|
u->source_output = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue