ref: e83d2aa3f7e61cdea146f580c99fda7d3593a3ff
parent: d7aadd808fd2d6f2d8f4a5daf8b3ec32a0968e8e
author: Jean-Marc Valin <[email protected]>
date: Thu Nov 14 20:52:28 EST 2013
Adds missing RESTORE_STACKs in celt_encode_with_ec()
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1305,7 +1305,10 @@
eBands = mode->eBands;
tf_estimate = 0;
if (nbCompressedBytes<2 || pcm==NULL)
- return OPUS_BAD_ARG;
+ {
+ RESTORE_STACK
+ return OPUS_BAD_ARG;
+ }
frame_size *= st->upsample;
for (LM=0;LM<=mode->maxLM;LM++)
@@ -1312,7 +1315,10 @@
if (mode->shortMdctSize<<LM==frame_size)
break;
if (LM>mode->maxLM)
+ {
+ RESTORE_STACK
return OPUS_BAD_ARG;
+ }
M=1<<LM;
N = M*mode->shortMdctSize;
@@ -1343,7 +1349,10 @@
{
int c0 = toOpus(compressed[0]);
if (c0<0)
+ {
+ RESTORE_STACK
return OPUS_BAD_ARG;
+ }
compressed[0] = c0;
}
compressed++;