diff options
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/dec_API.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/dec_API.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/dec_API.c b/lib/rbcodec/codecs/libopus/silk/dec_API.c index 908e6033b1..5b6e518130 100644 --- a/lib/rbcodec/codecs/libopus/silk/dec_API.c +++ b/lib/rbcodec/codecs/libopus/silk/dec_API.c | |||
@@ -12,7 +12,7 @@ documentation and/or other materials provided with the distribution. | |||
12 | names of specific contributors, may be used to endorse or promote | 12 | names of specific contributors, may be used to endorse or promote |
13 | products derived from this software without specific prior written | 13 | products derived from this software without specific prior written |
14 | permission. | 14 | permission. |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | 17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | 18 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
@@ -26,7 +26,7 @@ POSSIBILITY OF SUCH DAMAGE. | |||
26 | ***********************************************************************/ | 26 | ***********************************************************************/ |
27 | 27 | ||
28 | #ifdef HAVE_CONFIG_H | 28 | #ifdef HAVE_CONFIG_H |
29 | #include "opus_config.h" | 29 | #include "config.h" |
30 | #endif | 30 | #endif |
31 | #include "API.h" | 31 | #include "API.h" |
32 | #include "main.h" | 32 | #include "main.h" |
@@ -69,6 +69,9 @@ opus_int silk_InitDecoder( /* O Returns error co | |||
69 | for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) { | 69 | for( n = 0; n < DECODER_NUM_CHANNELS; n++ ) { |
70 | ret = silk_init_decoder( &channel_state[ n ] ); | 70 | ret = silk_init_decoder( &channel_state[ n ] ); |
71 | } | 71 | } |
72 | silk_memset(&((silk_decoder *)decState)->sStereo, 0, sizeof(((silk_decoder *)decState)->sStereo)); | ||
73 | /* Not strictly needed, but it's cleaner that way */ | ||
74 | ((silk_decoder *)decState)->prev_decode_only_middle = 0; | ||
72 | 75 | ||
73 | return ret; | 76 | return ret; |
74 | } | 77 | } |
@@ -97,6 +100,8 @@ opus_int silk_Decode( /* O Returns error co | |||
97 | opus_int stereo_to_mono; | 100 | opus_int stereo_to_mono; |
98 | SAVE_STACK; | 101 | SAVE_STACK; |
99 | 102 | ||
103 | silk_assert( decControl->nChannelsInternal == 1 || decControl->nChannelsInternal == 2 ); | ||
104 | |||
100 | /**********************************/ | 105 | /**********************************/ |
101 | /* Test if first frame in payload */ | 106 | /* Test if first frame in payload */ |
102 | /**********************************/ | 107 | /**********************************/ |