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

View File

@@ -451,12 +451,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_init(switch_codec_t *codec, co
implementation->init(codec, flags, codec_settings);
switch_mutex_init(&codec->mutex, SWITCH_MUTEX_NESTED, codec->memory_pool);
return SWITCH_STATUS_SUCCESS;
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Codec %s Exists but not at the desired implementation. %dhz %dms\n", codec_name, rate,
ms);
}
UNPROTECT_INTERFACE(codec_interface);
return SWITCH_STATUS_NOTIMPL;
}
@@ -541,6 +544,9 @@ SWITCH_DECLARE(switch_status_t) switch_core_codec_destroy(switch_codec_t *codec)
if (mutex) switch_mutex_lock(mutex);
codec->implementation->destroy(codec);
UNPROTECT_INTERFACE(codec->codec_interface);
memset(codec, 0, sizeof(*codec));
if (mutex) switch_mutex_unlock(mutex);