From deb1c3c7a87ff9933b7950b561caee1132194e1e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 29 Jun 2016 17:38:57 +0200 Subject: 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. --- audio/out/ao.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'audio') 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); -- cgit v1.2.3