diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-02-04 18:33:01 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-02-04 18:33:01 +0100 |
commit | b2c923e727f302a9e9c3a33f74a707cb47944a77 (patch) | |
tree | c48cccd812123038abbc233c5180855f1877869f /src/pulsecore | |
parent | 786398dc6312263ec4a14abd474fd0fd3def1ea4 (diff) |
properly handle failing stream creation
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/protocol-native.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 21a2cfbc..09318543 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -595,7 +595,7 @@ static record_stream* record_stream_new( int *ret) { record_stream *s; - pa_source_output *source_output; + pa_source_output *source_output = NULL; size_t base; pa_source_output_new_data data; @@ -618,7 +618,7 @@ static record_stream* record_stream_new( if (peak_detect) data.resample_method = PA_RESAMPLER_PEAKS; - *ret = pa_source_output_new(&source_output, c->protocol->core, &data, flags); + *ret = -pa_source_output_new(&source_output, c->protocol->core, &data, flags); pa_source_output_new_data_done(&data); @@ -971,7 +971,7 @@ static playback_stream* playback_stream_new( int *ret) { playback_stream *s, *ssync; - pa_sink_input *sink_input; + pa_sink_input *sink_input = NULL; pa_memchunk silence; uint32_t idx; int64_t start_index; @@ -1023,7 +1023,7 @@ static playback_stream* playback_stream_new( pa_sink_input_new_data_set_muted(&data, muted); data.sync_base = ssync ? ssync->sink_input : NULL; - *ret = pa_sink_input_new(&sink_input, c->protocol->core, &data, flags); + *ret = -pa_sink_input_new(&sink_input, c->protocol->core, &data, flags); pa_sink_input_new_data_done(&data); |