mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
timer mojo (cont)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4151 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -711,7 +711,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
switch_size_t bytes = 0;
|
||||
switch_status_t status;
|
||||
uint8_t check = 1;
|
||||
uint32_t diff = 0;
|
||||
|
||||
if (!rtp_session->timer.interval) {
|
||||
rtp_session->last_time = switch_time_now();
|
||||
@@ -758,7 +757,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
}
|
||||
|
||||
if (rtp_session->timer.interval) {
|
||||
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer, &diff) == SWITCH_STATUS_SUCCESS);
|
||||
check = (uint8_t)(switch_core_timer_check(&rtp_session->timer) == SWITCH_STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
if (check) {
|
||||
@@ -781,7 +780,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
|
||||
if (status == SWITCH_STATUS_BREAK || bytes == 0) {
|
||||
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_DATAWAIT)) {
|
||||
switch_yield(diff * 500);
|
||||
switch_yield((rtp_session->ms_per_packet / 1000) * 750);
|
||||
continue;
|
||||
}
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user