diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-08-29 23:35:17 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2011-08-29 23:35:17 -0400 |
commit | 44e27dd8c2e5bf0c85346f7189765e2338d8c0a9 (patch) | |
tree | 0330ab7721788807a129f255203413fb78045606 | |
parent | 69bfc67109abcf6ed4550b965ec65454e5b312f5 (diff) | |
download | opus-44e27dd8c2e5bf0c85346f7189765e2338d8c0a9.tar.gz |
Adds missing RESTORE_STACK to Opus encoder
-rw-r--r-- | src/opus_encoder.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/opus_encoder.c b/src/opus_encoder.c index 5fe8da7e..d0ecea01 100644 --- a/src/opus_encoder.c +++ b/src/opus_encoder.c @@ -280,7 +280,10 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, st->rangeFinal = 0; if (400*frame_size != st->Fs && 200*frame_size != st->Fs && 100*frame_size != st->Fs && 50*frame_size != st->Fs && 25*frame_size != st->Fs && 50*frame_size != 3*st->Fs) - return OPUS_BAD_ARG; + { + RESTORE_STACK; + return OPUS_BAD_ARG; + } silk_enc = (char*)st+st->silk_enc_offset; celt_enc = (CELTEncoder*)((char*)st+st->celt_enc_offset); @@ -555,6 +558,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, if (nBytes==0) { data[-1] = gen_toc(st->mode, st->Fs/frame_size, st->bandwidth, silk_internal_bandwidth, st->stream_channels); + RESTORE_STACK; return 1; } /* Extract SILK internal bandwidth for signaling in first byte */ @@ -761,6 +765,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size, else st->prev_mode = st->mode; st->first = 0; + RESTORE_STACK; return ret+1+redundancy_bytes; } |