Commit d2a3001b authored by Aymeric Moizard's avatar Aymeric Moizard
Browse files

fix msvc compilation

parent 5bcbcae2
...@@ -21,6 +21,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -21,6 +21,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <gsm/gsm.h> #include <gsm/gsm.h>
#ifdef _MSC_VER
#include <malloc.h>
#define alloca _alloca
#endif
typedef struct EncState{ typedef struct EncState{
gsm state; gsm state;
uint32_t ts; uint32_t ts;
...@@ -80,7 +85,7 @@ static void enc_process(MSFilter *f){ ...@@ -80,7 +85,7 @@ static void enc_process(MSFilter *f){
ms_bufferizer_put(s->bufferizer,im); ms_bufferizer_put(s->bufferizer,im);
} }
while(ms_bufferizer_get_avail(s->bufferizer) >= buff_size) { while(ms_bufferizer_get_avail(s->bufferizer) >= buff_size) {
buff = alloca(buff_size); buff = (int16_t *)alloca(buff_size);
ms_bufferizer_read(s->bufferizer,(uint8_t*)buff,buff_size); ms_bufferizer_read(s->bufferizer,(uint8_t*)buff,buff_size);
mblk_t *om=allocb(33*s->ptime/20,0); mblk_t *om=allocb(33*s->ptime/20,0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment