lavd/alsa-audio-common: mark default device in device list
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sat, 13 Dec 2014 18:46:15 +0000 (19:46 +0100)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Sun, 14 Dec 2014 22:55:41 +0000 (23:55 +0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavdevice/alsa-audio-common.c

index 749897f..b7f5313 100644 (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: