From: Arun Raghavan Date: Tue, 27 Mar 2012 19:31:32 +0000 (+0530) Subject: stream: Fix sample spec initialisation for extended API X-Git-Tag: 1.0_branch~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e9e0d50863b60c329cfc8ab85164fe7f7111532;p=profile%2Fivi%2Fpulseaudio.git stream: Fix sample spec initialisation for extended API This fixes pa_sample_spec init to use the correct API. Not doing so triggers a valgrind warning as we call pa_sample_spec_valid() on this later on, which checks the rate and channels fields. Thanks to RĂ©mi Denis-Courmont for reporting this. --- diff --git a/src/pulse/stream.c b/src/pulse/stream.c index 6115cef..39338c1 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -112,7 +112,7 @@ static pa_stream *pa_stream_new_with_proplist_internal( if (ss) s->sample_spec = *ss; else - s->sample_spec.format = PA_SAMPLE_INVALID; + pa_sample_spec_init(&s->sample_spec); if (map) s->channel_map = *map;