small tweak to new plc code
This commit is contained in:
parent
2e51b571b0
commit
0ca7930fa3
|
@ -325,13 +325,20 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
||||||
switch_thread_rwlock_unlock(session->bug_rwlock);
|
switch_thread_rwlock_unlock(session->bug_rwlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
status = switch_core_codec_decode(use_codec,
|
if (switch_test_flag(read_frame, SFF_PLC)) {
|
||||||
session->read_codec,
|
session->raw_read_frame.datalen = read_frame->codec->implementation->decoded_bytes_per_packet;
|
||||||
read_frame->data,
|
session->raw_read_frame.samples = session->raw_read_frame.datalen / sizeof(int16_t);
|
||||||
read_frame->datalen,
|
memset(session->raw_read_frame.data, 255, session->raw_read_frame.datalen);
|
||||||
session->read_impl.actual_samples_per_second,
|
status = SWITCH_STATUS_SUCCESS;
|
||||||
session->raw_read_frame.data, &session->raw_read_frame.datalen, &session->raw_read_frame.rate,
|
} else {
|
||||||
&read_frame->flags);
|
status = switch_core_codec_decode(use_codec,
|
||||||
|
session->read_codec,
|
||||||
|
read_frame->data,
|
||||||
|
read_frame->datalen,
|
||||||
|
session->read_impl.actual_samples_per_second,
|
||||||
|
session->raw_read_frame.data, &session->raw_read_frame.datalen, &session->raw_read_frame.rate,
|
||||||
|
&read_frame->flags);
|
||||||
|
}
|
||||||
|
|
||||||
if (status == SWITCH_STATUS_SUCCESS) {
|
if (status == SWITCH_STATUS_SUCCESS) {
|
||||||
if (switch_channel_test_flag(session->channel, CF_JITTERBUFFER) && !session->plc) {
|
if (switch_channel_test_flag(session->channel, CF_JITTERBUFFER) && !session->plc) {
|
||||||
|
|
Loading…
Reference in New Issue