From: Anthony Minessale Date: Sat, 10 Dec 2005 04:18:48 +0000 (+0000) Subject: git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@108 d0543943-73ff-0310... X-Git-Tag: v1.0-beta1~3604 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f467114570b75d2af2aa8972f281a1959de02722;p=thirdparty%2Ffreeswitch.git git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@108 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/mod_codec_g729/mod_codec_g729.c b/src/mod/mod_codec_g729/mod_codec_g729.c index 4e82cbab30..760199218f 100644 --- a/src/mod/mod_codec_g729/mod_codec_g729.c +++ b/src/mod/mod_codec_g729/mod_codec_g729.c @@ -46,12 +46,12 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla encoding = (flags & SWITCH_CODEC_FLAG_ENCODE); decoding = (flags & SWITCH_CODEC_FLAG_DECODE); - - if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(*context))))) { + + if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(struct g729_context))))) { return SWITCH_STATUS_FALSE; } else { - memset(context, 0, sizeof(*context)); if (encoding) { + //init_coder is fucked if you comment it no more crash g729_init_coder(&context->encoder_object, 0); } if (decoding) {