summaryrefslogtreecommitdiff
path: root/src/opus_decoder.c
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2011-09-06 15:19:04 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-09-06 15:19:04 -0400
commit50ef21c0a9dc7e56e6ca8c00b50afae2f9fedc99 (patch)
tree7540f92200c6653012a2be4e1b81495fedef0b5c /src/opus_decoder.c
parent331e9fe0fd37597908279f58e56065b7aedae699 (diff)
downloadopus-50ef21c0a9dc7e56e6ca8c00b50afae2f9fedc99.tar.gz
Making redundancy length decoding errors non-fatal
Diffstat (limited to 'src/opus_decoder.c')
-rw-r--r--src/opus_decoder.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/opus_decoder.c b/src/opus_decoder.c
index bd0886b3..bb1612fb 100644
--- a/src/opus_decoder.c
+++ b/src/opus_decoder.c
@@ -323,9 +323,11 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data,
}
}
len -= redundancy_bytes;
- if (len<0) {
- RESTORE_STACK;
- return OPUS_INVALID_PACKET;
+ if (len<0)
+ {
+ len=0;
+ redundancy_bytes=0;
+ redundancy = 0;
}
/* Shrink decoder because of raw bits */
dec.storage -= redundancy_bytes;