[Freeswitch-svn] [commit] r11684 - freeswitch/trunk/src/mod/codecs/mod_dahdi_codec

FreeSWITCH SVN moy at freeswitch.org
Sat Feb 7 22:33:22 PST 2009


Author: moy
Date: Sun Feb  8 00:33:22 2009
New Revision: 11684

Log:
fixed calculation of numchannels for decoders and transcoders for mod_dahdi_codec

Modified:
   freeswitch/trunk/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c

Modified: freeswitch/trunk/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c	Sun Feb  8 00:33:22 2009
@@ -364,11 +364,11 @@
 	for (info.tcnum = 0; !(res = ioctl(fd, DAHDI_TC_GETINFO, &info)); info.tcnum++) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Found dahdi transcoder name: %s\n", info.name);
 		if ((info.srcfmts & DAHDI_FORMAT_ULAW) && (info.dstfmts & (DAHDI_FORMAT_G729A | DAHDI_FORMAT_G723_1))) {
-			total_encoders += info.numchannels/2;
+			total_encoders += info.numchannels;
 			continue;
 		}
 		if ((info.dstfmts & DAHDI_FORMAT_ULAW) && (info.srcfmts & (DAHDI_FORMAT_G729A | DAHDI_FORMAT_G723_1))) {
-			total_decoders  += info.numchannels/2;
+			total_decoders  += info.numchannels;
 			continue;
 		}
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, 



More information about the Freeswitch-svn mailing list