mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-15 08:56:34 -05:00
alsa-mixer: Set mdev to NULL if there is no mapping
We check if mapping is NULL but if so we never set mdev, set it to NULL as well.
Fixes: 79cb1369fc
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/615>
This commit is contained in:
parent
da60f8af1d
commit
49b07edcaf
2 changed files with 2 additions and 4 deletions
|
|
@ -2121,8 +2121,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
|
||||||
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
|
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
|
||||||
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
||||||
|
|
||||||
if (mapping)
|
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
|
||||||
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
|
|
||||||
if (mdev) {
|
if (mdev) {
|
||||||
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, true);
|
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1821,8 +1821,7 @@ static void find_mixer(struct userdata *u, pa_alsa_mapping *mapping, const char
|
||||||
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
|
u->mixers = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func,
|
||||||
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
||||||
|
|
||||||
if (mapping)
|
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
|
||||||
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
|
|
||||||
if (mdev) {
|
if (mdev) {
|
||||||
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, false);
|
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, false);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue