[Freeswitch-svn] [commit] r2459 - in freeswitch/trunk/src/mod: codecs/mod_g726 endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Wed Aug 30 18:03:53 EDT 2006


Author: anthm
Date: Wed Aug 30 18:03:52 2006
New Revision: 2459

Modified:
   freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
fix some bugs and g726 wip (only 32 works so far)

Modified: freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c	Wed Aug 30 18:03:52 2006
@@ -159,7 +159,7 @@
 				//printf("new byte assign the %d bits\n", handle->bits_per_frame);
 				*handle->ptr = edata;
 			} else if (bits <= BITS_IN_A_BYTE) {
-				int shift_by = ((handle->bits_per_frame * (handle->ecount)) - handle->bits_per_frame);
+				int shift_by = ((handle->bits_per_frame * (handle->ecount -1)));
 				//printf ("shift by %d and add %d bits\n", shift_by, handle->bits_per_frame);
 				//*handle->ptr <<= shift_by;
 				//*handle->ptr |= edata;
@@ -168,8 +168,9 @@
 				//printf("edata\n");
 				//print_bits(edata);
 				//printf("\n");
-
-				*handle->ptr |= (edata << 4);
+				
+				*handle->ptr <<= shift_by;
+				*handle->ptr |= edata;
 
 				//printf("handle\n");
 				//print_bits(*handle->ptr);

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Wed Aug 30 18:03:52 2006
@@ -458,7 +458,10 @@
 static int do_describe(struct private_object *tech_pvt, int force)
 {
 	ldl_payload_t payloads[5];
-	assert(switch_core_session_get_channel(tech_pvt->session) != NULL);
+
+	if (!tech_pvt->session) {
+		return 0;
+	}
 
 	if (switch_test_flag(tech_pvt, TFLAG_DO_DESC)) {
 		return 1;



More information about the Freeswitch-svn mailing list