diff options
author | wm4 <wm4@nowhere> | 2017-03-14 18:06:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-03-14 18:06:17 +0100 |
commit | 94e82bcdb82dfedbb01978a68204c7ecd24d6b6c (patch) | |
tree | ede494075c666d8ec11f49c832dac3faa571a956 /audio | |
parent | d606b6af178d5bb3b53628fd859416139597deff (diff) | |
download | mpv-94e82bcdb82dfedbb01978a68204c7ecd24d6b6c.tar.bz2 mpv-94e82bcdb82dfedbb01978a68204c7ecd24d6b6c.tar.xz |
ao_alsa: fix device filtering, add another exception
The "return false;" was debugging code.
In addition, filter a plain "default", because it's not going to do
anything interesting and just looks ugly.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/out/ao_alsa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index e2f9130f98..f7f9a1a555 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -1143,7 +1143,6 @@ alsa_error: static bool is_useless_device(char *name) { - return false; char *crap[] = {"rear", "center_lfe", "side", "pulse", "null", "dsnoop", "hw"}; for (int i = 0; i < MP_ARRAY_SIZE(crap); i++) { int l = strlen(crap[i]); @@ -1151,6 +1150,9 @@ static bool is_useless_device(char *name) (!name[l] || name[l] == ':')) return true; } + // The standard default entry will achieve exactly the same. + if (name && strcmp(name, "default") == 0) + return true; return false; } |