look out below....(make current)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10363 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-11-12 19:28:05 +00:00
parent c62253405f
commit 722b830652
19 changed files with 162 additions and 68 deletions
+5
View File
@@ -76,6 +76,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
fh->memory_pool = pool;
} else {
if ((status = switch_core_new_memory_pool(&fh->memory_pool)) != SWITCH_STATUS_SUCCESS) {
UNPROTECT_INTERFACE(fh->file_interface);
return status;
}
switch_set_flag(fh, SWITCH_FILE_FLAG_FREE_POOL);
@@ -98,9 +99,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
}
if ((status = fh->file_interface->file_open(fh, file_path)) != SWITCH_STATUS_SUCCESS) {
UNPROTECT_INTERFACE(fh->file_interface);
return status;
}
if ((flags & SWITCH_FILE_FLAG_READ)) {
fh->native_rate = fh->samplerate;
} else {
@@ -281,6 +284,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
switch_resample_destroy(&fh->resampler);
UNPROTECT_INTERFACE(fh->file_interface);
if (switch_test_flag(fh, SWITCH_FILE_FLAG_FREE_POOL)) {
switch_core_destroy_memory_pool(&fh->memory_pool);
}