Index: pjproject/trunk/pjmedia/src/pjmedia/splitcomb.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/splitcomb.c	(revision 1227)
+++ pjproject/trunk/pjmedia/src/pjmedia/splitcomb.c	(revision 1266)
@@ -59,5 +59,5 @@
 	pjmedia_port *port;
 	pj_bool_t     reversed;
-    } *port_desc;
+    } port_desc[64];
 
     /* Temporary buffers needed to extract mono frame from
@@ -144,14 +144,16 @@
 
     /* Create the splitter/combiner structure */
-    sc = pj_pool_zalloc(pool, sizeof(struct splitcomb));
+    sc = PJ_POOL_ZALLOC_T(pool, struct splitcomb);
     PJ_ASSERT_RETURN(sc != NULL, PJ_ENOMEM);
 
     /* Create temporary buffers */
-    sc->get_buf = pj_pool_alloc(pool, samples_per_frame * 
+    sc->get_buf = (TMP_SAMP_TYPE*)
+		  pj_pool_alloc(pool, samples_per_frame * 
 				      sizeof(TMP_SAMP_TYPE) /
 				      channel_count);
     PJ_ASSERT_RETURN(sc->get_buf, PJ_ENOMEM);
 
-    sc->put_buf = pj_pool_alloc(pool, samples_per_frame * 
+    sc->put_buf = (TMP_SAMP_TYPE*)
+		  pj_pool_alloc(pool, samples_per_frame * 
 				      sizeof(TMP_SAMP_TYPE) /
 				      channel_count);
@@ -171,5 +173,8 @@
 
     /* Init ports array */
+    /*
     sc->port_desc = pj_pool_zalloc(pool, channel_count*sizeof(*sc->port_desc));
+    */
+    pj_bzero(sc->port_desc, sizeof(sc->port_desc));
 
     /* Done for now */
@@ -238,5 +243,5 @@
 
     /* Create the port */
-    rport = pj_pool_zalloc(pool, sizeof(struct reverse_port));
+    rport = PJ_POOL_ZALLOC_T(pool, struct reverse_port);
     rport->parent = sc;
     rport->ch_num = ch_num;
@@ -262,5 +267,6 @@
     /* Create put buffers */
     for (i=0; i<rport->buf_cnt; ++i) {
-	rport->dnstream_buf[i] = pj_pool_zalloc(pool, port->info.bytes_per_frame);
+	rport->dnstream_buf[i]=(pj_int16_t*)
+                               pj_pool_zalloc(pool, port->info.bytes_per_frame);
 	PJ_ASSERT_RETURN(rport->dnstream_buf[i], PJ_ENOMEM);
     }
@@ -269,5 +275,6 @@
     /* Create get buffers */
     for (i=0; i<rport->buf_cnt; ++i) {
-	rport->upstream_buf[i] = pj_pool_zalloc(pool, 
+	rport->upstream_buf[i] = (pj_int16_t*)
+				 pj_pool_zalloc(pool, 
 						port->info.bytes_per_frame);
 	PJ_ASSERT_RETURN(rport->upstream_buf[i], PJ_ENOMEM);
@@ -367,5 +374,5 @@
 
 	    /* Extract the mono frame */
-	    extract_mono_frame(frame->buf, sc->put_buf, ch, 
+	    extract_mono_frame((const pj_int16_t*)frame->buf, sc->put_buf, ch, 
 			       this_port->info.channel_count, 
 			       frame->size * 8 / 
@@ -405,5 +412,5 @@
 
 	    /* Extract mono-frame and put it in downstream buffer */
-	    extract_mono_frame(frame->buf, 
+	    extract_mono_frame((const pj_int16_t*)frame->buf, 
 			       rport->dnstream_buf[rport->dn_write_pos],
 			       ch, this_port->info.channel_count, 
@@ -434,5 +441,6 @@
 
     /* Clear output frame */
-    pjmedia_zero_samples(frame->buf, this_port->info.samples_per_frame);
+    pjmedia_zero_samples((pj_int16_t*)frame->buf, 
+			 this_port->info.samples_per_frame);
 
     /* Read frame from each port */
@@ -460,5 +468,6 @@
 
 	    /* Combine the mono frame into multichannel frame */
-	    store_mono_frame(mono_frame.buf, frame->buf, ch,
+	    store_mono_frame((const pj_int16_t*)mono_frame.buf, 
+			     (pj_int16_t*)frame->buf, ch,
 			     this_port->info.channel_count,
 			     mono_frame.size * 8 /
@@ -495,6 +504,6 @@
 
 	    /* Combine the mono frame into multichannel frame */
-	    store_mono_frame(rport->upstream_buf[rport->up_read_pos], 
-			     frame->buf, ch,
+	    store_mono_frame((const pj_int16_t*)rport->upstream_buf[rport->up_read_pos], 
+			     (pj_int16_t*)frame->buf, ch,
 			     this_port->info.channel_count,
 			     port->info.samples_per_frame);
@@ -580,5 +589,5 @@
 
     pjmedia_copy_samples(rport->upstream_buf[rport->up_write_pos],
-			 frame->buf, count);
+			 (const pj_int16_t*) frame->buf, count);
     rport->up_write_pos = (rport->up_write_pos+1) % rport->buf_cnt;
 
@@ -622,5 +631,5 @@
 
     /* Get the samples from the circular buffer */
-    pjmedia_copy_samples(frame->buf, 
+    pjmedia_copy_samples((pj_int16_t*)frame->buf, 
 			 rport->dnstream_buf[rport->dn_read_pos],
 			 count);
