[MPlayer-cvslog] r38147 - trunk/libao2/ao_kai.c
komh
subversion at mplayerhq.hu
Wed May 29 12:57:32 EEST 2019
Author: komh
Date: Wed May 29 12:57:32 2019
New Revision: 38147
Log:
kai: check boundaries more strictly
Suggested by reimar.
Modified:
trunk/libao2/ao_kai.c
Modified: trunk/libao2/ao_kai.c
==============================================================================
--- trunk/libao2/ao_kai.c Wed May 29 12:56:50 2019 (r38146)
+++ trunk/libao2/ao_kai.c Wed May 29 12:57:32 2019 (r38147)
@@ -166,7 +166,8 @@ static int init(int rate, int channels,
{NULL}
};
- const char *audioDriver[] = {"DART", "UNIAUD",};
+ const char *audioDriver[] = {"UNKNOWN", "DART", "UNIAUD",};
+ int nAudioDriver = sizeof(audioDriver) / sizeof(*audioDriver);
if (subopt_parse(ao_subdevice, subopts) != 0) {
print_help();
@@ -190,7 +191,7 @@ static int init(int rate, int channels,
kaiCaps(&kc);
mp_msg(MSGT_AO, MSGL_V, "KAI: selected audio driver = %s\n",
- audioDriver[kc.ulMode - 1]);
+ audioDriver[kc.ulMode >= nAudioDriver ? 0 : kc.ulMode]);
mp_msg(MSGT_AO, MSGL_V, "KAI: PDD name = %s, maximum channels = %lu\n",
kc.szPDDName, kc.ulMaxChannels);
More information about the MPlayer-cvslog
mailing list