From ca869b2ee46b294f9a8fecfefc9a67293bf97a57 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 16 Feb 2011 00:41:04 -0500 Subject: [PATCH] Makes sure there's a PLC-only region in the mode transition --- src/opus_decoder.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/opus_decoder.c b/src/opus_decoder.c index e4f4d677..41671ebe 100644 --- a/src/opus_decoder.c +++ b/src/opus_decoder.c @@ -225,15 +225,17 @@ int opus_decode(OpusDecoder *st, const unsigned char *data, if (transition) { - int tlength; + int plc_length, overlap; if (mode == MODE_CELT_ONLY) - tlength = IMIN(audiosize, 10+st->Fs/200); + plc_length = IMIN(audiosize, 10+st->Fs/200); else - tlength = IMIN(audiosize, 10+st->Fs/400); - for (i=0;iFs/400); + for (i=0;irangeFinal = dec.rng;