Additional multistream tests and reject channels<1 in MS API.
This commit is contained in:
parent
635b5f2f76
commit
582eba6f4f
3 changed files with 108 additions and 13 deletions
|
@ -163,7 +163,7 @@ int opus_multistream_encoder_init(
|
|||
int i;
|
||||
char *ptr;
|
||||
|
||||
if ((channels>255) || (coupled_streams>streams) ||
|
||||
if ((channels>255) || (channels<1) || (coupled_streams>streams) ||
|
||||
(coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))
|
||||
return OPUS_BAD_ARG;
|
||||
|
||||
|
@ -540,7 +540,7 @@ int opus_multistream_decoder_init(
|
|||
int i, ret;
|
||||
char *ptr;
|
||||
|
||||
if ((channels>255) || (coupled_streams>streams) ||
|
||||
if ((channels>255) || (channels<1) || (coupled_streams>streams) ||
|
||||
(coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))
|
||||
return OPUS_BAD_ARG;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue