]> code.delx.au - pulseaudio/commitdiff
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 92e364f8d147e61638f97f94c144eb772ff6e945..1706a7fbcb76bec6256c70e6197d6e949a95cda0 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 */