summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module-4a-client.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/module-4a-client.c b/module-4a-client.c
index 3e519ca..41885ae 100644
--- a/module-4a-client.c
+++ b/module-4a-client.c
@@ -266,8 +266,7 @@ static pa_hook_result_t sink_input_put_cb(pa_core *core,
pa_log_info("moving sink_input to alsa sink");
pa_sink_input_move_to(i, s, false);
} else {
- pa_xfree(stream->device_uri);
- stream->device_uri = NULL;
+ pa_log_info("failed to load alsa sink, closing 4A device");
jparams = json_object_new_object();
json_object_object_add(jparams, "action",
@@ -275,10 +274,9 @@ static pa_hook_result_t sink_input_put_cb(pa_core *core,
m4a_afb_call_async(d->comm, role, jparams,
(m4a_afb_done_cb_t) device_close_cb, stream);
+ return PA_HOOK_CANCEL;
}
- }
-
- if (!stream->device_uri) {
+ } else {
pa_log_info("sink_input is not authorized to connect to 4A");
//TODO maybe queue and play this stream when 4A allows it