提交 651faae1 authored 作者: Michael Jerris's avatar Michael Jerris

fix edge case segfault

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12697 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 5d2b9966
...@@ -448,11 +448,10 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s ...@@ -448,11 +448,10 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
if (rh->fh) { if (rh->fh) {
switch_core_file_close(rh->fh); switch_core_file_close(rh->fh);
} if (rh->fh->samples_out < read_impl.samples_per_second * 3) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Discarding short file %s\n", rh->file);
if (rh->fh->samples_out < read_impl.samples_per_second * 3) { switch_file_remove(rh->file, switch_core_session_get_pool(session));
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Discarding short file %s\n", rh->file); }
switch_file_remove(rh->file, switch_core_session_get_pool(session));
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论