summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-24 19:21:41 +0100
committerwm4 <wm4@nowhere>2015-11-24 19:21:41 +0100
commitef918b239ec514f0e6b26dd3633096be1ec1fb3e (patch)
tree83986bccf576631633407731a9be2c10c47ced42 /audio
parent00b7fb30237365a530b47d451833f9b53b2bf6b9 (diff)
downloadmpv-ef918b239ec514f0e6b26dd3633096be1ec1fb3e.tar.bz2
mpv-ef918b239ec514f0e6b26dd3633096be1ec1fb3e.tar.xz
ao_alsa: list bidirectional devices too
The ALSA doxygen says: IOID - input / output identification ("Input" or "Output"), NULL means both This bug was blatantly introduced with commit cf94fce4.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_alsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 4112ab3c83..a0b05c898d 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -987,7 +987,7 @@ static void list_devs(struct ao *ao, struct ao_device_list *list)
char *name = snd_device_name_get_hint(hints[n], "NAME");
char *desc = snd_device_name_get_hint(hints[n], "DESC");
char *io = snd_device_name_get_hint(hints[n], "IOID");
- if (io && strcmp(io, "Output") == 0) {
+ if (!io || strcmp(io, "Output") == 0) {
char desc2[1024];
snprintf(desc2, sizeof(desc2), "%s", desc ? desc : "");
for (int i = 0; desc2[i]; i++) {