Better handling of the bandwidth

This commit is contained in:
Jean-Marc Valin 2011-02-04 00:38:50 -05:00
parent e904758c5a
commit 2c8b29806b
2 changed files with 55 additions and 3 deletions

View file

@ -84,6 +84,10 @@ int opus_decode(OpusDecoder *st, const unsigned char *data,
short pcm_celt[960*2];
int audiosize;
/* Payloads of 1 (2 including ToC) or 0 trigger the PLC/DTX */
if (len<=2)
data = NULL;
if (data != NULL)
{
/* Decoding mode/bandwidth/framesize from first byte */