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.
This commit is contained in:
Arun Raghavan 2012-03-28 01:01:32 +05:30
parent f1a36e84a7
commit 5e9e0d5086

View file

@ -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;