sink-input: Don't print an error if a passthrough connection fails
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 28 Mar 2011 03:15:31 +0000 (08:45 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Sun, 15 May 2011 04:39:06 +0000 (10:09 +0530)
The assertion message is misleading, since the passthrough connection
can fail for reasons the client has no control over (like other sink
inputs being connected).

src/pulsecore/sink-input.c

index 5e7cfd1..979dc76 100644 (file)
@@ -302,7 +302,8 @@ int pa_sink_input_new(
     pa_return_val_if_fail(!data->sync_base || (data->sync_base->sink == data->sink && pa_sink_input_get_state(data->sync_base) == PA_SINK_INPUT_CORKED), -PA_ERR_INVALID);
 
     r = check_passthrough_connection(pa_sink_input_new_data_is_passthrough(data), data->sink);
-    pa_return_val_if_fail(r == PA_OK, r);
+    if (r != PA_OK)
+        return r;
 
     if (!data->sample_spec_is_set)
         data->sample_spec = data->sink->sample_spec;