mirror of
https://github.com/mpv-player/mpv
synced 2025-03-03 20:57:45 +00:00
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.
This commit is contained in:
parent
9ca1592f3f
commit
deb1c3c7a8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user