提交 3b47424b authored 作者: Brian West's avatar Brian West

commit both 8k and 16k versions

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2535 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 febbefc6
...@@ -53,7 +53,6 @@ static switch_status_t switch_g722_init(switch_codec_t *codec, switch_codec_flag ...@@ -53,7 +53,6 @@ static switch_status_t switch_g722_init(switch_codec_t *codec, switch_codec_flag
if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(struct g722_context))))) { if (!(encoding || decoding) || (!(context = switch_core_alloc(codec->memory_pool, sizeof(struct g722_context))))) {
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} else { } else {
if (!(encoding || decoding)) {
if (encoding) { if (encoding) {
if(codec->implementation->samples_per_second == 16000){ if(codec->implementation->samples_per_second == 16000){
g722_encode_init(&context->encoder_object, 64000, G722_PACKED); g722_encode_init(&context->encoder_object, 64000, G722_PACKED);
...@@ -69,7 +68,7 @@ static switch_status_t switch_g722_init(switch_codec_t *codec, switch_codec_flag ...@@ -69,7 +68,7 @@ static switch_status_t switch_g722_init(switch_codec_t *codec, switch_codec_flag
} }
} }
} }
}
codec->private_info = context; codec->private_info = context;
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论