提交 a8a66e91 authored 作者: Anthony Minessale's avatar Anthony Minessale

tweak media bugs timeout

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10453 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 d8604b66
...@@ -318,15 +318,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -318,15 +318,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
switch_mutex_lock(bp->read_mutex); switch_mutex_lock(bp->read_mutex);
switch_buffer_write(bp->raw_read_buffer, read_frame->data, read_frame->datalen); switch_buffer_write(bp->raw_read_buffer, read_frame->data, read_frame->datalen);
if (bp->callback) { if (bp->callback) {
if (bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ) == SWITCH_FALSE ok = bp->callback(bp, bp->user_data, SWITCH_ABC_TYPE_READ);
|| (bp->stop_time && bp->stop_time <= switch_timestamp(NULL))) {
ok = SWITCH_FALSE;
}
} }
switch_mutex_unlock(bp->read_mutex); switch_mutex_unlock(bp->read_mutex);
} }
if (switch_test_flag(bp, SMBF_READ_REPLACE)) { if (ok && switch_test_flag(bp, SMBF_READ_REPLACE)) {
do_bugs = 0; do_bugs = 0;
if (bp->callback) { if (bp->callback) {
bp->read_replace_frame_in = read_frame; bp->read_replace_frame_in = read_frame;
...@@ -336,6 +333,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi ...@@ -336,6 +333,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
} }
} }
} }
if (bp->stop_time && bp->stop_time <= switch_timestamp(NULL)) {
ok = SWITCH_FALSE;
}
if (ok == SWITCH_FALSE) { if (ok == SWITCH_FALSE) {
bp->ready = 0; bp->ready = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论