mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 00:02:13 +00:00
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:
parent
b6381a0ee3
commit
eead97f103
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user