[Freeswitch-svn] [commit] r2489 - in freeswitch/trunk/src: include mod/codecs/mod_g726

Freeswitch SVN anthm at freeswitch.org
Sun Sep 3 10:28:08 EDT 2006


Author: anthm
Date: Sun Sep  3 10:28:08 2006
New Revision: 2489

Modified:
   freeswitch/trunk/src/include/switch_bitpack.h
   freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c

Log:
compiler warning cleanup (part 3 [getting old])

Modified: freeswitch/trunk/src/include/switch_bitpack.h
==============================================================================
--- freeswitch/trunk/src/include/switch_bitpack.h	(original)
+++ freeswitch/trunk/src/include/switch_bitpack.h	Sun Sep  3 10:28:08 2006
@@ -264,7 +264,7 @@
 			pack->bytes++;
 			pack->bits_cur = pack->shiftby = 0;
 		} else {
-			pack->bits_cur = next;
+			pack->bits_cur = (switch_byte_t) next;
 		}
 	}
 

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	Sun Sep  3 10:28:08 2006
@@ -64,7 +64,7 @@
 	if (!(encoding || decoding) || (!(handle = switch_core_alloc(codec->memory_pool, sizeof(*handle))))) {
 		return SWITCH_STATUS_FALSE;
 	} else {
-		handle->bytes = codec->implementation->encoded_bytes_per_frame;
+		handle->bytes = (switch_byte_t) codec->implementation->encoded_bytes_per_frame;
 		
 		switch(handle->bytes) {
 		case 100:
@@ -95,7 +95,7 @@
 
 		g726_init_state(&handle->context);
 		codec->private_info = handle;
-		handle->bits_per_frame = (switch_byte_t) codec->implementation->bits_per_second / (codec->implementation->samples_per_second);
+		handle->bits_per_frame = (switch_byte_t) (codec->implementation->bits_per_second / (codec->implementation->samples_per_second));
 		handle->mode = (flags & SWITCH_CODEC_FLAG_AAL2 || strstr(codec->implementation->iananame, "AAL2")) 
 			? SWITCH_BITPACK_MODE_AAL2 : SWITCH_BITPACK_MODE_RFC3551;
 		return SWITCH_STATUS_SUCCESS;
@@ -144,7 +144,7 @@
 
 		for (x = 0; x < loops && new_len < *encoded_data_len; x++) {
 			int edata = handle->encoder(*ddp, AUDIO_ENCODING_LINEAR, context);
-			switch_bitpack_in(&handle->pack, edata);
+			switch_bitpack_in(&handle->pack, (switch_byte_t) edata);
 			ddp++;
 		}
 		switch_bitpack_done(&handle->pack);



More information about the Freeswitch-svn mailing list