ref: fb45a3fac2198c2e6c57f6d8daedf1c2c5004184
parent: f54b69b7e811753a2df49c3035487da64f1fd9f1
author: Jean-Marc Valin <[email protected]>
date: Thu Feb 3 08:40:30 EST 2011
Build fixes
--- a/configure.ac
+++ b/configure.ac
@@ -19,9 +19,6 @@
AC_C_RESTRICT
AC_TYPE_SIZE_T
-# Checks for library functions.
-AC_FUNC_MALLOC
-
export OPUS_BUILD=true
AC_CONFIG_SUBDIRS([celt])
AC_CONFIG_SUBDIRS([silk])
--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -242,6 +242,7 @@
while (!stop)
{
int write_samples;
+ int lost;
err = fread(in, sizeof(short), frame_size*channels, fin);
tot_read += err;
if (err < frame_size*channels)
@@ -257,7 +258,8 @@
return 1;
}
- opus_decode(dec, rand()%100<packet_loss_perc ? NULL : data, len, out, frame_size);
+ lost = rand()%100<packet_loss_perc;
+ opus_decode(dec, lost ? NULL : data, len, out, frame_size);
count++;
tot_written += (frame_size-skip)*channels;
write_samples = frame_size;
@@ -271,7 +273,7 @@
#if OPUS_TEST_RANGE_CODER_STATE
/* compare final range encoder rng values of encoder and decoder */
- if( opus_decoder_get_final_range( dec ) != opus_encoder_get_final_range( enc ) ) {
+ if( !lost && opus_decoder_get_final_range( dec ) != opus_encoder_get_final_range( enc ) ) {
fprintf (stderr, "Error: Range coder state mismatch between encoder and decoder.\n");
return 0;
}