[pulseaudio-commits] src/modules

David Henningsson diwic at kemper.freedesktop.org
Wed Apr 4 00:17:21 PDT 2012


 src/modules/module-loopback.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e815a1f81a5a018f8d7c8f6be7f93e600606ed24
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue Apr 3 18:56:21 2012 +0200

    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 at canonical.com>

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 0d65682..1a69445 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -152,11 +152,13 @@ static void teardown(struct userdata *u) {
         pa_source_output_unlink(u->source_output);
 
     if (u->sink_input) {
+        u->sink_input->parent.process_msg = pa_sink_input_process_msg;
         pa_sink_input_unref(u->sink_input);
         u->sink_input = NULL;
     }
 
     if (u->source_output) {
+        u->source_output->parent.process_msg = pa_source_output_process_msg;
         pa_source_output_unref(u->source_output);
         u->source_output = NULL;
     }



More information about the pulseaudio-commits mailing list