From: Brian West Date: Mon, 13 Apr 2009 16:15:32 +0000 (+0000) Subject: add patch from ml X-Git-Tag: v1.0.4~1179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=551f0b3091390f9e96482901bbc5e41c60304b2d;p=thirdparty%2Ffreeswitch.git add patch from ml git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13010 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c index 137579a72e..694791cbc2 100644 --- a/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c +++ b/src/mod/codecs/mod_dahdi_codec/mod_dahdi_codec.c @@ -133,9 +133,6 @@ static switch_status_t init_encoder(switch_codec_t *codec) #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 @@ static switch_status_t switch_dahdi_init(switch_codec_t *codec, switch_codec_fla 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; }