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

FreeSWITCH SVN brian at freeswitch.org
Mon Apr 13 09:15:32 PDT 2009


Author: brian
Date: Mon Apr 13 11:15:32 2009
New Revision: 13010

Log:
add patch from ml

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	Mon Apr 13 11:15:32 2009
@@ -133,9 +133,6 @@
 #endif
 		return SWITCH_STATUS_FALSE;
 	}
-	/* ulaw requires 8 times more storage than g729 and 12 times more than G723, right? */
-	context->codec_r = (codec->implementation->ianacode == CODEC_G729_IANA_CODE) 
-		? 8 : 12;
 #ifdef DEBUG_DAHDI_CODEC
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Encoding requested and granted with %d/%d.\n",
 					  fmts.srcfmt, fmts.dstfmt);
@@ -197,6 +194,10 @@
 	context->encoding_fd = -1;
 	context->decoding_fd = -1;
 
+	/* ulaw requires 8 times more storage than g729 and 12 times more than G723, right? */
+	context->codec_r = (codec->implementation->ianacode == CODEC_G729_IANA_CODE) 
+		? 8 : 12;
+
 	return SWITCH_STATUS_SUCCESS;
 }
 



More information about the Freeswitch-svn mailing list