diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-05-08 08:06:10 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-05-10 14:07:45 +0200 |
commit | 2a0a13425fac86ec9a02d615b7095ec88baa00c1 (patch) | |
tree | 4f578da8de89630f4340b0bca2ff21652ca222fe | |
parent | 39b316ff061b12e9b89231ed5765f52816519d88 (diff) | |
download | mpv-2a0a13425fac86ec9a02d615b7095ec88baa00c1.tar.bz2 mpv-2a0a13425fac86ec9a02d615b7095ec88baa00c1.tar.xz |
ao_coreaudio: don't fallback to full waveext
The code was falling back to the full waveext chmap_sel when less than 2
channels were detected. This new code is slightly more correct since it only
fills the chmap_sel with the stereo or mono chmap in the fallback case.
-rw-r--r-- | audio/out/ao_coreaudio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index f37a31aed6..c74648cd6b 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -312,10 +312,11 @@ static int init(struct ao *ao) talloc_free(layouts); - if (ao->channels.num < 3) - // If the input is not surround or we could not get any usable - // bitmap from the hardware, default to waveext... - mp_chmap_sel_add_waveext(&chmap_sel); + if (ao->channels.num < 3) { + struct mp_chmap chmap; + mp_chmap_from_channels(&chmap, ao->channels.num); + mp_chmap_sel_add_map(&chmap_sel, &chmap); + } if (!ao_chmap_sel_adjust(ao, &chmap_sel, &ao->channels)) { MP_ERR(ao, "could not select a suitable channel map among the " |