]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@108 d0543943-73ff-0310...
authorAnthony Minessale <anthony.minessale@gmail.com>
Sat, 10 Dec 2005 04:18:48 +0000 (04:18 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Sat, 10 Dec 2005 04:18:48 +0000 (04:18 +0000)
src/mod/mod_codec_g729/mod_codec_g729.c

index 4e82cbab306bdff0a2523416470af8e24eae3f5d..760199218f9018f6c33b471e4321a79000ac23ee 100644 (file)
@@ -46,12 +46,12 @@ static switch_status switch_g729_init(switch_codec *codec, switch_codec_flag fla
        \r
        encoding = (flags & SWITCH_CODEC_FLAG_ENCODE);\r
        decoding = (flags & SWITCH_CODEC_FLAG_DECODE);\r
-\r
-       if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(*context))))) {\r
+       \r
+       if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(struct g729_context))))) {\r
                return SWITCH_STATUS_FALSE;\r
        } else {\r
-               memset(context, 0, sizeof(*context));\r
                if (encoding) {\r
+                       //init_coder is fucked if you comment it no more crash\r
                        g729_init_coder(&context->encoder_object, 0);\r
                }\r
                if (decoding) {\r