summaryrefslogtreecommitdiff
path: root/tests/test_opus_encode.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-04 15:07:45 -0500
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-12-04 15:07:45 -0500
commit7fcd66c40d0257796c912a6f500a98cbea89e704 (patch)
treefd4f7464453c559e34ad0080ba114bef0a4d5363 /tests/test_opus_encode.c
parent124f69b00ca3dae73b1815985b0a83c30934afa6 (diff)
downloadopus-7fcd66c40d0257796c912a6f500a98cbea89e704.tar.gz
Changes the PLC behaviour and fixes the FEC behaviour on concatenated packets
PLC and FEC now return exactly the number of samples specified for the buffer rather than (usually) returning the size of the last packet. Doc and tests are updated accordingly.
Diffstat (limited to 'tests/test_opus_encode.c')
-rw-r--r--tests/test_opus_encode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_opus_encode.c b/tests/test_opus_encode.c
index 61e0dec1..b80def3f 100644
--- a/tests/test_opus_encode.c
+++ b/tests/test_opus_encode.c
@@ -269,7 +269,7 @@ int run_test1(int no_fuzz)
if(opus_decoder_ctl(dec, OPUS_GET_FINAL_RANGE(&dec_final_range))!=OPUS_OK)test_failed();
if(enc_final_range!=dec_final_range)test_failed();
/*LBRR decode*/
- out_samples = opus_decode(dec_err[0], packet, len, out2buf, MAX_FRAME_SAMP, (fast_rand()&3)!=0);
+ out_samples = opus_decode(dec_err[0], packet, len, out2buf, frame_size, (fast_rand()&3)!=0);
if(out_samples!=frame_size)test_failed();
out_samples = opus_decode(dec_err[1], packet, (fast_rand()&3)==0?0:len, out2buf, MAX_FRAME_SAMP, (fast_rand()&7)!=0);
if(out_samples<120)test_failed();
@@ -317,8 +317,8 @@ int run_test1(int no_fuzz)
if(enc_final_range!=dec_final_range)test_failed();
/*LBRR decode*/
loss=(fast_rand()&63)==0;
- out_samples = opus_multistream_decode(MSdec_err, packet, loss?0:len, out2buf, MAX_FRAME_SAMP, (fast_rand()&3)!=0);
- if(loss?out_samples<120:out_samples!=(frame_size*6))test_failed();
+ out_samples = opus_multistream_decode(MSdec_err, packet, loss?0:len, out2buf, frame_size*6, (fast_rand()&3)!=0);
+ if(out_samples!=(frame_size*6))test_failed();
i+=frame_size;
count++;
}while(i<(SSAMPLES/12-MAX_FRAME_SAMP));