Fix invalid sink input treatment after module-loopback
authorManuel Bachmann <manuel.bachmann@iot.bzh>
Fri, 10 Jun 2016 12:08:06 +0000 (14:08 +0200)
committerYannick Gicquel <yannick.gicquel@iot.bzh>
Tue, 11 Oct 2016 15:09:06 +0000 (17:09 +0200)
When loading module-loopback, it may create a new sink
input replicating the original one, but with no client
attached. We don't want to re-pass this one through the
whole logic (with NULL sink, etc), so just consider it
legit.

Change-Id: I218c459e1685621c1f59e1d8722e0f1cff88d225
Signed-off-by: Manuel Bachmann <manuel.bachmann@iot.bzh>
discover.c

index e6e8243..eea6986 100644 (file)
@@ -586,6 +586,10 @@ bool pa_discover_preroute_sink_input(struct userdata *u, pa_sink_input_new_data
        pa_assert_se (nodeset = u->nodeset);
        pa_assert_se (pl = data->proplist);
 
+        /* is this a valid sink input ? */
+       if (!data->client)
+               return true;
+
         /* is there an existing matching node ? */
        node = agl_node_get_from_data (u, agl_input, data);