diff options
author | wm4 <wm4@nowhere> | 2015-07-06 00:04:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-07-06 00:04:20 +0200 |
commit | e4b963e643b93474d21e16b50c1e9fcf40bddcae (patch) | |
tree | b53b04953c14f7065bee213066f9c64e3c78dbbd /audio/out/ao_coreaudio_exclusive.c | |
parent | 7b9d72658898574f4b001bcc496bf3532d4b3cc5 (diff) | |
download | mpv-e4b963e643b93474d21e16b50c1e9fcf40bddcae.tar.bz2 mpv-e4b963e643b93474d21e16b50c1e9fcf40bddcae.tar.xz |
ao_coreaudio_exclusive: continue even if setting physical format fails
Makes it work with (apparently) crappy drivers, which refuse to set the
physical format in some cases.
Diffstat (limited to 'audio/out/ao_coreaudio_exclusive.c')
-rw-r--r-- | audio/out/ao_coreaudio_exclusive.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/out/ao_coreaudio_exclusive.c b/audio/out/ao_coreaudio_exclusive.c index 015bcf7764..031bc67b9e 100644 --- a/audio/out/ao_coreaudio_exclusive.c +++ b/audio/out/ao_coreaudio_exclusive.c @@ -288,8 +288,9 @@ static int init(struct ao *ao) &p->original_asbd); CHECK_CA_ERROR("could not get stream's original physical format"); - if (!ca_change_physical_format_sync(ao, p->stream, hwfmt)) - goto coreaudio_error; + // Even if changing the physical format fails, we can try using the current + // virtual format. + ca_change_physical_format_sync(ao, p->stream, hwfmt); if (!ca_init_chmap(ao, p->device)) goto coreaudio_error; |