Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@octasic.com>2011-03-09 02:05:45 +0300
committerJean-Marc Valin <jean-marc.valin@octasic.com>2011-03-09 02:05:45 +0300
commit9a115b9d76bd983f3766734427a90b0c12469866 (patch)
tree147e91074f6c62ae992dfc459191ece279be54c1
parentf9bc460e3640e870fcf71534868d09d4cc415258 (diff)
Cleanup
-rw-r--r--src/opus_encoder.c2
-rw-r--r--src/test_opus.c25
2 files changed, 2 insertions, 25 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index 80088780..c002757b 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -589,6 +589,8 @@ void opus_encoder_ctl(OpusEncoder *st, int request, ...)
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;
diff --git a/src/test_opus.c b/src/test_opus.c
index 57e610a3..565f40db 100644
--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -233,31 +233,6 @@ int main(int argc, char *argv[])
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);