diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c index 688ec07a5..763590809 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c @@ -608,15 +608,11 @@ int16_t WebRtcIsacfix_UpdateBwEstimate1(ISACFIX_MainStruct *ISAC_main_inst, { ISACFIX_SubStruct *ISAC_inst; Bitstr_dec streamdata; - uint16_t partOfStream[5]; #ifndef WEBRTC_ARCH_BIG_ENDIAN int k; #endif int16_t err; - /* Set stream pointer to point at partOfStream */ - streamdata.stream = (uint16_t *)partOfStream; - /* typecast pointer to real structure */ ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst; @@ -696,15 +692,11 @@ int16_t WebRtcIsacfix_UpdateBwEstimate(ISACFIX_MainStruct *ISAC_main_inst, { ISACFIX_SubStruct *ISAC_inst; Bitstr_dec streamdata; - uint16_t partOfStream[5]; #ifndef WEBRTC_ARCH_BIG_ENDIAN int k; #endif int16_t err; - /* Set stream pointer to point at partOfStream */ - streamdata.stream = (uint16_t *)partOfStream; - /* typecast pointer to real structure */ ISAC_inst = (ISACFIX_SubStruct *)ISAC_main_inst; @@ -811,7 +803,6 @@ int16_t WebRtcIsacfix_Decode(ISACFIX_MainStruct *ISAC_main_inst, return -1; } - (ISAC_inst->ISACdec_obj.bitstr_obj).stream = (uint16_t *)encoded; ISAC_inst->ISACdec_obj.bitstr_obj.stream_size = (len + 1) >> 1; /* convert bitstream from int16_t to bytes */ @@ -913,7 +904,7 @@ int16_t WebRtcIsacfix_DecodeNb(ISACFIX_MainStruct *ISAC_main_inst, return -1; } - (ISAC_inst->ISACdec_obj.bitstr_obj).stream = (uint16_t *)encoded; + ISAC_inst->ISACdec_obj.bitstr_obj.stream_size = (len + 1) >> 1; /* convert bitstream from int16_t to bytes */ #ifndef WEBRTC_ARCH_BIG_ENDIAN @@ -1288,15 +1279,11 @@ int16_t WebRtcIsacfix_ReadFrameLen(const int16_t* encoded, int16_t* frameLength) { Bitstr_dec streamdata; - uint16_t partOfStream[5]; #ifndef WEBRTC_ARCH_BIG_ENDIAN int k; #endif int16_t err; - /* Set stream pointer to point at partOfStream */ - streamdata.stream = (uint16_t *)partOfStream; - streamdata.W_upper = 0xFFFFFFFF; streamdata.streamval = 0; streamdata.stream_index = 0; @@ -1337,15 +1324,11 @@ int16_t WebRtcIsacfix_ReadBwIndex(const int16_t* encoded, int16_t* rateIndex) { Bitstr_dec streamdata; - uint16_t partOfStream[5]; #ifndef WEBRTC_ARCH_BIG_ENDIAN int k; #endif int16_t err; - /* Set stream pointer to point at partOfStream */ - streamdata.stream = (uint16_t *)partOfStream; - streamdata.W_upper = 0xFFFFFFFF; streamdata.streamval = 0; streamdata.stream_index = 0; diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h index b4d2bd899..bd20ba016 100644 --- a/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h +++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/structs.h @@ -26,7 +26,7 @@ /* Bitstream struct for decoder */ typedef struct Bitstreamstruct_dec { - uint16_t *stream; /* Pointer to bytestream to decode */ + uint16_t stream[STREAM_MAXW16_60MS]; /* Array bytestream to decode */ uint32_t W_upper; /* Upper boundary of interval W */ uint32_t streamval; uint16_t stream_index; /* Index to the current position in bytestream */