sink, source: Always create a hashmap for ports.

Having the hashmap sometimes NULL requires a lot of checking
here and there, so ensuring that the hashmap is always
non-NULL simplifies the code.
This commit is contained in:
Tanu Kaskinen 2012-06-08 21:49:09 +03:00
parent 21c6c70438
commit 1a6da64b16
10 changed files with 56 additions and 66 deletions

View file

@ -1952,7 +1952,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
}
if (u->mixer_path_set)
pa_alsa_add_ports(&data.ports, u->mixer_path_set, card);
pa_alsa_add_ports(&data, u->mixer_path_set, card);
u->source = pa_source_new(m->core, &data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY|(u->use_tsched ? PA_SOURCE_DYNAMIC_LATENCY : 0));
pa_source_new_data_done(&data);