git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@104 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e59b65efa6
commit
b4e75a2743
|
@ -178,10 +178,13 @@ SWITCH_DECLARE(switch_status) switch_core_codec_init(switch_codec *codec, char *
|
||||||
}
|
}
|
||||||
|
|
||||||
if (implementation) {
|
if (implementation) {
|
||||||
|
switch_status status;
|
||||||
codec->codec_interface = codec_interface;
|
codec->codec_interface = codec_interface;
|
||||||
codec->implementation = implementation;
|
codec->implementation = implementation;
|
||||||
codec->flags = flags;
|
codec->flags = flags;
|
||||||
switch_core_new_memory_pool(&codec->memory_pool);
|
if ((status = switch_core_new_memory_pool(&codec->memory_pool)) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
implementation->init(codec, flags, codec_settings);
|
implementation->init(codec, flags, codec_settings);
|
||||||
|
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
@ -258,7 +261,7 @@ SWITCH_DECLARE(switch_status) switch_core_codec_destroy(switch_codec *codec)
|
||||||
SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *timer_name, int interval, int samples)
|
SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *timer_name, int interval, int samples)
|
||||||
{
|
{
|
||||||
switch_timer_interface *timer_interface;
|
switch_timer_interface *timer_interface;
|
||||||
|
switch_status status;
|
||||||
memset(timer, 0, sizeof(*timer));
|
memset(timer, 0, sizeof(*timer));
|
||||||
if (!(timer_interface = loadable_module_get_timer_interface(timer_name))) {
|
if (!(timer_interface = loadable_module_get_timer_interface(timer_name))) {
|
||||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "invalid timer %s!\n", timer_name);
|
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "invalid timer %s!\n", timer_name);
|
||||||
|
@ -269,7 +272,9 @@ SWITCH_DECLARE(switch_status) switch_core_timer_init(switch_timer *timer, char *
|
||||||
timer->samples = samples;
|
timer->samples = samples;
|
||||||
timer->samplecount = 0;
|
timer->samplecount = 0;
|
||||||
timer->timer_interface = timer_interface;
|
timer->timer_interface = timer_interface;
|
||||||
switch_core_new_memory_pool(&timer->memory_pool);
|
if ((status = switch_core_new_memory_pool(&timer->memory_pool)) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
timer->timer_interface->timer_init(timer);
|
timer->timer_interface->timer_init(timer);
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue