From e36bceded8db0974055f1c2c26d6b22b111f73c8 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Tue, 11 Apr 2006 12:49:48 +0000 Subject: [PATCH] fixed multiple gsm frames per packet bug (hopefully this was the last one) git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@20 8eb893ce-cfd4-0310-b710-fb5ebe64c474 --- core/plug-in/gsm/gsm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/plug-in/gsm/gsm.c b/core/plug-in/gsm/gsm.c index 32e44f1c..415dff9c 100644 --- a/core/plug-in/gsm/gsm.c +++ b/core/plug-in/gsm/gsm.c @@ -59,6 +59,7 @@ END_EXPORTS static int pcm16_2_gsm(unsigned char* out_buf, unsigned char* in_buf, unsigned int size, unsigned int channels, unsigned int rate, long h_codec ) { + int i; div_t blocks; blocks = div(size,320); @@ -67,13 +68,16 @@ static int pcm16_2_gsm(unsigned char* out_buf, unsigned char* in_buf, unsigned i return -1; } - gsm_encode((gsm)h_codec,(gsm_signal*)in_buf,out_buf); + for (i=0;i