mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04: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,
|
||||
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
||||
|
||||
if (mapping)
|
||||
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
|
||||
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
|
||||
if (mdev) {
|
||||
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, true);
|
||||
} 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,
|
||||
NULL, (pa_free_cb_t) pa_alsa_mixer_free);
|
||||
|
||||
if (mapping)
|
||||
mdev = pa_proplist_gets(mapping->proplist, "alsa.mixer_device");
|
||||
mdev = mapping ? pa_proplist_gets(mapping->proplist, "alsa.mixer_device") : NULL;
|
||||
if (mdev) {
|
||||
u->mixer_handle = pa_alsa_open_mixer_by_name(u->mixers, mdev, false);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue