summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-05 16:00:17 +0100
committerwm4 <wm4@nowhere>2014-12-05 16:04:05 +0100
commitc6deee380141d1e5d4e99d3491a19f218df239d7 (patch)
treea6ae5780702aead707bbfe43775abe108ecf6bc8
parentf95a4bceaa58a51b0a3ff5e16f50bf48b1c814d0 (diff)
downloadmpv-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.
-rw-r--r--audio/out/ao_alsa.c3
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