summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-11-07 15:17:30 +0100
committerwm4 <wm4@nowhere>2015-11-07 15:18:05 +0100
commit5a7c22a1ac4561aab90f316ee394aa269fb75408 (patch)
treec2f2968076ecc7253adb4c4999f5b124af0151ae /audio
parent617aff6cdab6484e39cd4074111569e2f5dec9d3 (diff)
downloadmpv-5a7c22a1ac4561aab90f316ee394aa269fb75408.tar.bz2
mpv-5a7c22a1ac4561aab90f316ee394aa269fb75408.tar.xz
ao_alsa: remove the last bits of legacy channel map fallback
Essentially we'd use something random, just because it's part of the srt of traditionally used ALSA channel mappings. But each driver can do its own things. This doesn't let me sleep at night, so remove it.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/ao_alsa.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c
index 6c34d6bcc1..4112ab3c83 100644
--- a/audio/out/ao_alsa.c
+++ b/audio/out/ao_alsa.c
@@ -691,9 +691,7 @@ static int init_device(struct ao *ao)
if (num_channels != ao->channels.num) {
int req = ao->channels.num;
- mp_chmap_from_channels_alsa(&ao->channels, num_channels);
- if (!mp_chmap_is_valid(&ao->channels))
- mp_chmap_from_channels(&ao->channels, 2);
+ mp_chmap_from_channels(&ao->channels, MPMIN(2, num_channels));
MP_ERR(ao, "Asked for %d channels, got %d - fallback to %s.\n", req,
num_channels, mp_chmap_to_str(&ao->channels));
}