diff options
author | David Henningsson <david.henningsson@canonical.com> | 2013-04-16 14:56:35 +0200 |
---|---|---|
committer | David Henningsson <david.henningsson@canonical.com> | 2013-04-24 12:54:55 +0200 |
commit | d136568427ed7fcbb0a2bf5bfa9765a3802d770c (patch) | |
tree | 176ed72d320b5a0365f0a7454fdf1f87fbffde90 | |
parent | 96cb27c725ca8dc656f50fa2227615d55a07e273 (diff) |
alsa: Fix ELD access warning on shutdown
The hdmi_eld_changed callback is called by alsa-lib at shutdown.
In that case, just exit instead of trying to access something with
already closed handles.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
-rw-r--r-- | src/modules/alsa/module-alsa-card.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c index 9b739dca..b37eabc4 100644 --- a/src/modules/alsa/module-alsa-card.c +++ b/src/modules/alsa/module-alsa-card.c @@ -409,6 +409,9 @@ static int hdmi_eld_changed(snd_hctl_elem_t *elem, unsigned int mask) { pa_hdmi_eld eld; bool changed = false; + if (mask == SND_CTL_EVENT_MASK_REMOVE) + return 0; + p = find_port_with_eld_device(u->card->ports, device); if (p == NULL) { pa_log_error("Invalid device changed in ALSA: %d", device); |