Commit b6abe4e4 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

added the missing initialization of hIvasDec->flushBuffer

parent e18faadf
Loading
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -988,6 +988,13 @@ ivas_error IVAS_DEC_EnableVoIP(
    }
#endif

#ifdef OBJ_EDITING_API
    if ( hIvasDec->flushbuffer == NULL && ( hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR || hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
    {
        hIvasDec->flushbuffer = (void *) malloc( CPE_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES * sizeof( Word16 ) );
        set16_fx( (Word16 *) hIvasDec->flushbuffer, 0, CPE_CHANNELS * hIvasDec->nSamplesFrame / IVAS_MAX_PARAM_SPATIAL_SUBFRAMES );
    }
#endif

    return IVAS_ERR_OK;
}