mirror of https://github.com/mpv-player/mpv
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_HeadphonesRight, MP_SPEAKER_ID_DR },
|
||||||
|
|
||||||
{ kAudioChannelLabel_Unknown, MP_SPEAKER_ID_UNKNOWN0 },
|
{ kAudioChannelLabel_Unknown, MP_SPEAKER_ID_UNKNOWN0 },
|
||||||
|
|
||||||
|
{ 0, -1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ca_label_to_mp_speaker_id(AudioChannelLabel label)
|
static int ca_label_to_mp_speaker_id(AudioChannelLabel label)
|
||||||
|
|
Loading…
Reference in New Issue