lavd/alsa-audio-common: mark default device in device list

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit is contained in:
Lukasz Marek 2014-12-13 19:46:15 +01:00
parent 279412c833
commit b3311f3cc9
1 changed files with 2 additions and 0 deletions

View File

@ -379,6 +379,8 @@ int ff_alsa_get_device_list(AVDeviceInfoList *device_list, snd_pcm_stream_t stre
&device_list->nb_devices, new_device)) < 0) {
goto fail;
}
if (!strcmp(new_device->device_name, "default"))
device_list->default_device = device_list->nb_devices - 1;
new_device = NULL;
}
fail: