fix some sample count issues

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15395 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-11-06 23:29:36 +00:00
parent a05556e7ba
commit 940ba327e7
4 changed files with 13 additions and 9 deletions

View File

@@ -474,7 +474,7 @@ static switch_bool_t record_callback(switch_media_bug_t *bug, void *user_data, s
switch_core_file_close(rh->fh);
if (rh->fh->samples_out < read_impl.samples_per_second * rh->min_sec) {
if (rh->fh->samples_out < rh->fh->samplerate * rh->min_sec) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Discarding short file %s\n", rh->file);
switch_file_remove(rh->file, switch_core_session_get_pool(session));
}