Fixed some more allocation issue -- there's now a basic codec working
diff --git a/celt b/celt
index bdcaaf7..c7bcf38 160000
--- a/celt
+++ b/celt
@@ -1 +1 @@
-Subproject commit bdcaaf73c62844f7971b946ae19d641e58a8afad
+Subproject commit c7bcf389da1d5537cd66ae552f0dfe164834bd3d
diff --git a/src/hybrid_encoder.c b/src/hybrid_encoder.c
index 7644c7d..85201ad 100644
--- a/src/hybrid_encoder.c
+++ b/src/hybrid_encoder.c
@@ -65,7 +65,7 @@
     st->encControl.useInBandFEC          = 0;
     st->encControl.useDTX                = 0;
     st->encControl.complexity            = 2;
-    st->encControl.bitRate               = 20000;
+    st->encControl.bitRate               = 18000;
 
     /* Create CELT encoder */
 	/* We should not have to create a CELT mode for each encoder state */
@@ -87,6 +87,10 @@
 	ec_byte_writeinit_buffer(&buf, data, bytes_per_packet);
 	ec_enc_init(&enc,&buf);
 
+    st->encControl.bitRate               = (bytes_per_packet*50*8+4000)/2;
+    if (st->encControl.bitRate>30000)
+    	st->encControl.bitRate = 30000;
+
 	/* Call SILK encoder for the low band */
 	silk_ret = SKP_Silk_SDK_Encode( st->silk_enc, &st->encControl, pcm, 960, &enc, &nBytes );
     if( silk_ret ) {