]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fixed calculation of numchannels for decoders and transcoders for mod_dahdi_codec
authorMoises Silva <moy@sangoma.com>
Sun, 8 Feb 2009 06:33:22 +0000 (06:33 +0000)
committerMoises Silva <moy@sangoma.com>
Sun, 8 Feb 2009 06:33:22 +0000 (06:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11684 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c

index 510627ab56e66322566b70fe473ee34b699bf151..901e105c9030329bbadc2a36c45cdf14a1ce5c6c 100644 (file)
@@ -364,11 +364,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dahdi_codec_load)
        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,