diff options
Diffstat (limited to 'lib/rbcodec/codecs/libopus/silk/log2lin.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/silk/log2lin.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbcodec/codecs/libopus/silk/log2lin.c b/lib/rbcodec/codecs/libopus/silk/log2lin.c index 50be565cb5..a692e009db 100644 --- a/lib/rbcodec/codecs/libopus/silk/log2lin.c +++ b/lib/rbcodec/codecs/libopus/silk/log2lin.c | |||
@@ -8,7 +8,7 @@ this list of conditions and the following disclaimer. | |||
8 | - Redistributions in binary form must reproduce the above copyright | 8 | - Redistributions in binary form must reproduce the above copyright |
9 | notice, this list of conditions and the following disclaimer in the | 9 | notice, this list of conditions and the following disclaimer in the |
10 | documentation and/or other materials provided with the distribution. | 10 | documentation and/or other materials provided with the distribution. |
11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the | 11 | - Neither the name of Internet Society, IETF or IETF Trust, nor the |
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. |
@@ -41,7 +41,9 @@ opus_int32 silk_log2lin( | |||
41 | 41 | ||
42 | if( inLog_Q7 < 0 ) { | 42 | if( inLog_Q7 < 0 ) { |
43 | return 0; | 43 | return 0; |
44 | } | 44 | } else if ( inLog_Q7 >= 3967 ) { |
45 | return silk_int32_MAX; | ||
46 | } | ||
45 | 47 | ||
46 | out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); | 48 | out = silk_LSHIFT( 1, silk_RSHIFT( inLog_Q7, 7 ) ); |
47 | frac_Q7 = inLog_Q7 & 0x7F; | 49 | frac_Q7 = inLog_Q7 & 0x7F; |