diff options
Diffstat (limited to 'tests/test_opus_decode.c')
-rw-r--r-- | tests/test_opus_decode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_opus_decode.c b/tests/test_opus_decode.c index e2c04c2..44a0ae5 100644 --- a/tests/test_opus_decode.c +++ b/tests/test_opus_decode.c @@ -111,6 +111,10 @@ int test_decoder_code0(int no_fuzz) if(opus_decoder_ctl(dec[t], OPUS_GET_LAST_PACKET_DURATION(&dur))!=OPUS_OK)test_failed(); if(dur!=120/factor)test_failed(); + /*Test on a size which isn't a multiple of 2.5ms*/ + out_samples = opus_decode(dec[t], 0, 0, outbuf, 120/factor+2, fec); + if(out_samples!=OPUS_BAD_ARG)test_failed(); + /*Test null pointer input*/ out_samples = opus_decode(dec[t], 0, -1, outbuf, 120/factor, fec); if(out_samples!=120/factor)test_failed(); @@ -230,8 +234,8 @@ int test_decoder_code0(int no_fuzz) /*We only test a subset of the modes here simply because the longer durations end up taking a long time.*/ static const int cmodes[4]={16,20,24,28}; - static const opus_uint32 cres[4]={116290185,2172123586,2172123586,2172123586}; - static const opus_uint32 lres[3]={3285687739,1481572662,694350475}; + static const opus_uint32 cres[4]={116290185,2172123586u,2172123586u,2172123586u}; + static const opus_uint32 lres[3]={3285687739u,1481572662,694350475}; static const int lmodes[3]={0,4,8}; int mode=fast_rand()%4; |