ref: 9a115b9d76bd983f3766734427a90b0c12469866
parent: f9bc460e3640e870fcf71534868d09d4cc415258
author: Jean-Marc Valin <[email protected]>
date: Tue Mar 8 13:05:45 EST 2011
Cleanup
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -589,6 +589,8 @@
case OPUS_SET_VOICE_RATIO_REQUEST:
{
int value = va_arg(ap, int);
+ if (value>100 || value<0)
+ return OPUS_BAD_ARG;
st->voice_ratio = value;
}
break;
--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -233,31 +233,6 @@
return 1;
}
- /*if (mode==MODE_SILK_ONLY)
- {
- if (bandwidth == BANDWIDTH_SUPERWIDEBAND || bandwidth == BANDWIDTH_FULLBAND)
- {
- fprintf (stderr, "Predictive mode only supports up to wideband\n");
- return 1;
- }
- }
- if (mode==MODE_HYBRID)
- {
- if (bandwidth != BANDWIDTH_SUPERWIDEBAND && bandwidth != BANDWIDTH_FULLBAND)
- {
- fprintf (stderr, "Hybrid mode only supports superwideband and fullband\n");
- return 1;
- }
- }
- if (mode==MODE_CELT_ONLY)
- {
- if (bandwidth == BANDWIDTH_MEDIUMBAND)
- {
- fprintf (stderr, "Transform mode does not support mediumband\n");
- return 1;
- }
- }*/
-
enc = opus_encoder_create(sampling_rate, channels);
dec = opus_decoder_create(sampling_rate, channels);