sink-input: Return NOTSUPPORTED if format negotiation fails
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 2 Mar 2011 05:30:49 +0000 (11:00 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Mon, 2 May 2011 06:24:48 +0000 (11:54 +0530)
This is easier for clients to grok than INVALID.

src/pulsecore/sink-input.c

index 92e364f..1706a7f 100644 (file)
@@ -276,7 +276,7 @@ int pa_sink_input_new(
     if (!data->format && data->nego_formats && !pa_idxset_isempty(data->nego_formats))
         data->format = pa_format_info_copy(pa_idxset_first(data->nego_formats, NULL));
 
-    pa_return_val_if_fail(data->format, -PA_ERR_INVALID);
+    pa_return_val_if_fail(data->format, -PA_ERR_NOTSUPPORTED);
 
     /* Now populate the sample spec and format according to the final
      * format that we've negotiated */