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 c25d86c7db
commit 8c95537698
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++;