forked from Mirrors/freeswitch
revert
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16682 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
984f0f44d9
commit
34a7a594e2
@ -105,15 +105,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
|
|||||||
switch_io_event_hook_read_frame_t *ptr;
|
switch_io_event_hook_read_frame_t *ptr;
|
||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
int need_codec, perfect, do_bugs = 0, do_resample = 0, is_cng = 0;
|
int need_codec, perfect, do_bugs = 0, do_resample = 0, is_cng = 0;
|
||||||
unsigned int flag = 0, sanity = 5000;
|
unsigned int flag = 0;
|
||||||
switch_codec_implementation_t codec_impl;
|
switch_codec_implementation_t codec_impl;
|
||||||
|
|
||||||
switch_assert(session != NULL);
|
|
||||||
|
|
||||||
while(!switch_channel_media_ack(session->channel) || !switch_channel_test_flag(session->channel, CF_MEDIA_SET)) {
|
switch_assert(session != NULL);
|
||||||
if (!--sanity) break;
|
|
||||||
switch_cond_next();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(session->read_codec && session->read_codec->implementation && switch_core_codec_ready(session->read_codec))) {
|
if (!(session->read_codec && session->read_codec->implementation && switch_core_codec_ready(session->read_codec))) {
|
||||||
if (switch_channel_test_flag(session->channel, CF_PROXY_MODE) || switch_channel_get_state(session->channel) == CS_HIBERNATE) {
|
if (switch_channel_test_flag(session->channel, CF_PROXY_MODE) || switch_channel_get_state(session->channel) == CS_HIBERNATE) {
|
||||||
@ -572,7 +567,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||||
switch_frame_t *enc_frame = NULL, *write_frame = frame;
|
switch_frame_t *enc_frame = NULL, *write_frame = frame;
|
||||||
unsigned int flag = 0, need_codec = 0, perfect = 0, do_bugs = 0, do_write = 0, do_resample = 0, ptime_mismatch = 0, pass_cng = 0, resample = 0;
|
unsigned int flag = 0, need_codec = 0, perfect = 0, do_bugs = 0, do_write = 0, do_resample = 0, ptime_mismatch = 0, pass_cng = 0, resample = 0;
|
||||||
unsigned int sanity = 5000;
|
|
||||||
int did_write_resample = 0;
|
int did_write_resample = 0;
|
||||||
|
|
||||||
switch_assert(session != NULL);
|
switch_assert(session != NULL);
|
||||||
@ -589,12 +583,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
|
|||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while(!switch_channel_media_ack(session->channel) || !switch_channel_test_flag(session->channel, CF_MEDIA_SET)) {
|
|
||||||
if (!--sanity) break;
|
|
||||||
switch_cond_next();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(session->write_codec && switch_core_codec_ready(session->write_codec)) && !pass_cng) {
|
if (!(session->write_codec && switch_core_codec_ready(session->write_codec)) && !pass_cng) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s has no write codec.\n", switch_channel_get_name(session->channel));
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "%s has no write codec.\n", switch_channel_get_name(session->channel));
|
||||||
return SWITCH_STATUS_FALSE;
|
return SWITCH_STATUS_FALSE;
|
||||||
|
Loading…
Reference in New Issue
Block a user