Minor redundant frame fixes

This commit is contained in:
Jean-Marc Valin 2011-03-18 16:29:15 -04:00
parent f2c8e5dfee
commit eed33090eb
2 changed files with 4 additions and 3 deletions

View file

@ -214,6 +214,8 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
else
redundancy_bytes = len - ((ec_tell(&dec)+7)>>3);
len -= redundancy_bytes;
if (len<0)
return CELT_CORRUPTED_DATA;
/* Shrink decoder because of raw bits */
dec.storage -= redundancy_bytes;
}