diff options
author | wm4 <wm4@nowhere> | 2014-12-05 16:00:17 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-12-05 16:04:05 +0100 |
commit | c6deee380141d1e5d4e99d3491a19f218df239d7 (patch) | |
tree | a6ae5780702aead707bbfe43775abe108ecf6bc8 /audio/out | |
parent | f95a4bceaa58a51b0a3ff5e16f50bf48b1c814d0 (diff) | |
download | mpv-c6deee380141d1e5d4e99d3491a19f218df239d7.tar.bz2 mpv-c6deee380141d1e5d4e99d3491a19f218df239d7.tar.xz |
ao_alsa: hackfix mono playback
ALSA returns "FL" as channel layout when trying to play mono. mpv and
libavresample don't like this; in particular, using libavresample to
convert stereo to "FL" fails.
Diffstat (limited to 'audio/out')
-rw-r--r-- | audio/out/ao_alsa.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index be9363b1d7..86393aef19 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -628,6 +628,9 @@ static int init(struct ao *ao) MP_WARN(ao, "Got unknown channel map from ALSA.\n"); } + if (ao->channels.num == 1) + ao->channels.speaker[0] = MP_SP(FC); + free(alsa_chmap); } #endif |