summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-25 20:17:14 +0200
committerwm4 <wm4@nowhere>2015-06-25 20:17:14 +0200
commit3c61e6eb4e2d340e959d5395ec7c61902fa28b1d (patch)
treee85edbc6f410db5b4ad144f85d60d41065b8eba8
parent5a3cdb8f1e8b14daf11d44ef729a2484982b7305 (diff)
downloadmpv-3c61e6eb4e2d340e959d5395ec7c61902fa28b1d.tar.bz2
mpv-3c61e6eb4e2d340e959d5395ec7c61902fa28b1d.tar.xz
ao_coreaudio_utils: compare full AudioStreamBasicDescription
Originally, this was written for comparing the sample format only, but ca_change_physical_format_sync() actually expects that the full format is compared. (For all other uses it doesn't matter.)
-rw-r--r--audio/out/ao_coreaudio_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/out/ao_coreaudio_utils.c b/audio/out/ao_coreaudio_utils.c
index 52b0e32194..aa1c9934d6 100644
--- a/audio/out/ao_coreaudio_utils.c
+++ b/audio/out/ao_coreaudio_utils.c
@@ -222,7 +222,9 @@ bool ca_asbd_equals(const AudioStreamBasicDescription *a,
a->mBitsPerChannel == b->mBitsPerChannel &&
ca_normalize_formatid(a->mFormatID) ==
ca_normalize_formatid(b->mFormatID) &&
- a->mBytesPerPacket == b->mBytesPerPacket;
+ a->mBytesPerPacket == b->mBytesPerPacket &&
+ a->mChannelsPerFrame == b->mChannelsPerFrame &&
+ a->mSampleRate == b->mSampleRate;
}
// Return the AF_FORMAT_* (AF_FORMAT_S16 etc.) corresponding to the asbd.