diff options
author | George Marques <george@gmarqu.es> | 2016-05-01 12:48:46 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2016-05-02 13:18:34 -0300 |
commit | 7c59d819a7ebb936d51ca032e66a2489e4080d08 (patch) | |
tree | df6747620113a36812194db3456729aac2fa1b08 /drivers/opus/opus_multistream_decoder.c | |
parent | a3d81cab8a97eeece54ebadb82c40532188b4d57 (diff) |
Update Opus driver to 1.1.2
And opusfile to 0.7.
Diffstat (limited to 'drivers/opus/opus_multistream_decoder.c')
-rw-r--r-- | drivers/opus/opus_multistream_decoder.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/opus/opus_multistream_decoder.c b/drivers/opus/opus_multistream_decoder.c index 43c695d815..25100edba2 100644 --- a/drivers/opus/opus_multistream_decoder.c +++ b/drivers/opus/opus_multistream_decoder.c @@ -24,10 +24,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -#ifdef OPUS_ENABLED #include "opus/opus_config.h" -#endif #include "opus/opus_multistream.h" #include "opus/opus.h" @@ -75,7 +72,7 @@ int opus_multistream_decoder_init( char *ptr; if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + (streams<1) || (coupled_streams<0) || (streams>255-coupled_streams)) return OPUS_BAD_ARG; st->layout.nb_channels = channels; @@ -119,7 +116,7 @@ OpusMSDecoder *opus_multistream_decoder_create( int ret; OpusMSDecoder *st; if ((channels>255) || (channels<1) || (coupled_streams>streams) || - (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0)) + (streams<1) || (coupled_streams<0) || (streams>255-coupled_streams)) { if (error) *error = OPUS_BAD_ARG; @@ -317,7 +314,7 @@ static void opus_copy_channel_out_float( if (src != NULL) { for (i=0;i<frame_size;i++) -#if defined(OPUS_FIXED_POINT) +#if defined(FIXED_POINT) float_dst[i*dst_stride+dst_channel] = (1/32768.f)*src[i*src_stride]; #else float_dst[i*dst_stride+dst_channel] = src[i*src_stride]; @@ -346,7 +343,7 @@ static void opus_copy_channel_out_short( if (src != NULL) { for (i=0;i<frame_size;i++) -#if defined(OPUS_FIXED_POINT) +#if defined(FIXED_POINT) short_dst[i*dst_stride+dst_channel] = src[i*src_stride]; #else short_dst[i*dst_stride+dst_channel] = FLOAT2INT16(src[i*src_stride]); |