ao_coreaudio: fix out of bounds access

ca_label_to_mp_speaker_id() checked whether the last entry was >= 0, but
actually this condition was never true, and MP_SPEAKER_ID_UNKNOWN0 is
not negative.
This commit is contained in:
wm4 2015-05-04 23:54:38 +02:00
parent b6381a0ee3
commit eead97f103
1 changed files with 2 additions and 0 deletions

View File

@ -446,6 +446,8 @@ static const int speaker_map[][2] = {
{ kAudioChannelLabel_HeadphonesRight, MP_SPEAKER_ID_DR },
{ kAudioChannelLabel_Unknown, MP_SPEAKER_ID_UNKNOWN0 },
{ 0, -1 },
};
static int ca_label_to_mp_speaker_id(AudioChannelLabel label)