mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-01 19:20:05 +00:00
MODENDP-276
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16387 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
176a8a7861
commit
59039bfde1
@ -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
|
|||||||
//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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user