diff options
author | Gregory Maxwell <greg@xiph.org> | 2012-08-22 00:08:35 +0400 |
---|---|---|
committer | Gregory Maxwell <greg@xiph.org> | 2012-08-22 00:08:35 +0400 |
commit | 582eba6f4f703929e646f6dc6e864d9b12f4f4af (patch) | |
tree | b4e82b3f1428a525744784f26b3abc4ed2eaa086 /src/opus_multistream.c | |
parent | 635b5f2f76ed1950e978c373c8a2469ef0637354 (diff) |
Additional multistream tests and reject channels<1 in MS API.
Diffstat (limited to 'src/opus_multistream.c')
-rw-r--r-- | src/opus_multistream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/opus_multistream.c b/src/opus_multistream.c index 36119799..a38b1210 100644 --- a/src/opus_multistream.c +++ b/src/opus_multistream.c @@ -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; |