提交 59039bfd authored 作者: Anthony Minessale's avatar Anthony Minessale

MODENDP-276

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16387 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 176a8a78
...@@ -590,19 +590,18 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch ...@@ -590,19 +590,18 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
tech_pvt->cng_frame.datalen = tech_pvt->read_codec.implementation->decoded_bytes_per_packet; tech_pvt->cng_frame.datalen = tech_pvt->read_codec.implementation->decoded_bytes_per_packet;
memset(tech_pvt->cng_frame.data, 0, tech_pvt->cng_frame.datalen); memset(tech_pvt->cng_frame.data, 0, tech_pvt->cng_frame.datalen);
memset(&data, 0, sizeof(data)); memset(&data, 0, tech_pvt->read_codec.implementation->decoded_bytes_per_packet);
if (strcasecmp(tech_pvt->read_codec.implementation->iananame, "L16")) { if (strcasecmp(tech_pvt->read_codec.implementation->iananame, "L16")) {
encode_status = switch_core_codec_encode(&tech_pvt->read_codec, encode_status = switch_core_codec_encode(&tech_pvt->read_codec,
NULL, NULL,
data, data,
sizeof(data), tech_pvt->read_codec.implementation->decoded_bytes_per_packet,
tech_pvt->read_codec.implementation->actual_samples_per_second, tech_pvt->read_codec.implementation->actual_samples_per_second,
tech_pvt->cng_frame.data,
tech_pvt->cng_frame.data, &tech_pvt->cng_frame.datalen,
&tech_pvt->cng_frame.datalen, &rate,
&rate, &flag);
&flag);
if (encode_status != SWITCH_STATUS_SUCCESS) { if (encode_status != SWITCH_STATUS_SUCCESS) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER); switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
} }
...@@ -612,7 +611,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch ...@@ -612,7 +611,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
//switch_set_flag((&tech_pvt->cng_frame), SFF_CNG); //switch_set_flag((&tech_pvt->cng_frame), SFF_CNG);
switch_clear_flag_locked(tech_pvt, TFLAG_CNG); switch_clear_flag_locked(tech_pvt, TFLAG_CNG);
} }
if (*frame) { if (*frame) {
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论