sio_oss.c: Disallow tiny fragment sizes, as they may overload

the system. And as sndiod runs with increased priority, it would
consume all the cpu and could in turn hang the system.
This commit is contained in:
Alexandre Ratchov 2016-11-05 07:14:46 +01:00
parent fdca3c2678
commit b3acce35f8
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ sio_oss_setpar(struct sio_hdl *sh, struct sio_par *par)
}
frag_max = round * hdl->chan * formats[i].bps;
frag_shift = 0;
frag_shift = 8;
while (1 << (frag_shift + 1) <= frag_max)
frag_shift++;