Commit a5fb9f78 authored by Andreas Hartmetz's avatar Andreas Hartmetz Committed by Jean-Baptiste Kempf

Make ALSA devices without description appear in Qt4 config.

If an /etc/asound.conf or $HOME/.asoundrc creates devices, those do not have a
description (a null pointer is returned). Relatedly, redefining the "default"
device results in it being listed without a description, thus disabling the
code that adds "default" WITH a description.
Possibly fixes other problems where ALSA devices with a NULL
description are disregarded. In Qt4 config, the NULL check is in
StringListConfigControl::finish().
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent b356201f
......@@ -738,9 +738,10 @@ static int EnumDevices(vlc_object_t *obj, char const *varname,
continue;
char *desc = snd_device_name_get_hint(hint, "DESC");
if (desc != NULL)
for (char *lf = strchr(desc, '\n'); lf; lf = strchr(lf, '\n'))
*lf = ' ';
if (desc == NULL)
desc = xstrdup (name);
for (char *lf = strchr(desc, '\n'); lf; lf = strchr(lf, '\n'))
*lf = ' ';
msg_Dbg (obj, "%s (%s)", (desc != NULL) ? desc : name, name);
ids = xrealloc (ids, (n + 1) * sizeof (*ids));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment