diff options
author | wm4 <wm4@nowhere> | 2015-06-26 15:49:40 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-26 15:56:19 +0200 |
commit | 8134a0601b0cafbd466bf2b44f15a8592ce7b05f (patch) | |
tree | a82f45af6e6e47f34846c8cf25ccc4e34da7e27f /audio/out/ao_coreaudio_exclusive.c | |
parent | 3c61e6eb4e2d340e959d5395ec7c61902fa28b1d (diff) | |
download | mpv-8134a0601b0cafbd466bf2b44f15a8592ce7b05f.tar.bz2 mpv-8134a0601b0cafbd466bf2b44f15a8592ce7b05f.tar.xz |
ao_coreaudio: explicitly skip input streams
This may or may not fix some issues with the format switching
code. Actually, it seems somewhat unlikely, but then checking
the stream type isn't incorrect either, and is probably
something the API user should always be doing.
Diffstat (limited to 'audio/out/ao_coreaudio_exclusive.c')
-rw-r--r-- | audio/out/ao_coreaudio_exclusive.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/audio/out/ao_coreaudio_exclusive.c b/audio/out/ao_coreaudio_exclusive.c index e96c73c7ed..b16641483d 100644 --- a/audio/out/ao_coreaudio_exclusive.c +++ b/audio/out/ao_coreaudio_exclusive.c @@ -206,6 +206,14 @@ static int init(struct ao *ao) CHECK_CA_ERROR("could not get number of streams"); for (int i = 0; i < n_streams && p->stream_idx < 0; i++) { + uint32_t direction; + err = CA_GET(streams[i], kAudioStreamPropertyDirection, &direction); + CHECK_CA_ERROR("could not get stream direction"); + if (direction != 0) { + MP_VERBOSE(ao, "Substream %d is not an output stream.\n", i); + continue; + } + bool compressed = ca_stream_supports_compressed(ao, streams[i]); if (compressed) { |