mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user