Better handling of DTX for range coder state checks

This commit is contained in:
Jean-Marc Valin 2011-08-20 00:21:46 -04:00
parent d48277374a
commit 2b98bdf532
2 changed files with 5 additions and 1 deletions

View file

@ -261,6 +261,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
opus_uint32 redundant_rng = 0;
ALLOC_STACK;
st->rangeFinal = 0;
if (400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs &&
50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs)
return OPUS_BAD_ARG;