diff options
author | wm4 <wm4@nowhere> | 2016-06-29 17:38:57 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-29 17:38:57 +0200 |
commit | deb1c3c7a87ff9933b7950b561caee1132194e1e (patch) | |
tree | e864bc6fb9afd066b9be915e0419bc5bd961d2c8 /audio/out/ao.c | |
parent | 9ca1592f3f2bf6389a2e1f616f2a39b189554401 (diff) |
audio: don't add default entry to audio-device-list if AO support listing
In such cases there isn't really a reason to do so, and using such an
entry would probably fail anyway.
Also convenient for the following commit.
Diffstat (limited to 'audio/out/ao.c')
-rw-r--r-- | audio/out/ao.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/audio/out/ao.c b/audio/out/ao.c index 9c0f644c75..c9d8f42b4a 100644 --- a/audio/out/ao.c +++ b/audio/out/ao.c @@ -490,10 +490,9 @@ struct ao_hotplug *ao_hotplug_create(struct mpv_global *global, static void get_devices(struct ao *ao, struct ao_device_list *list) { int num = list->num_devices; - if (ao->driver->list_devs) + if (ao->driver->list_devs) { ao->driver->list_devs(ao, list); - // Add at least a default entry - if (list->num_devices == num) { + } else { char name[80] = "Default"; if (num > 1) mp_snprintf_cat(name, sizeof(name), " (%s)", ao->driver->name); |