提交 7e61b16d authored 作者: Anthony Minessale's avatar Anthony Minessale

destroy codec

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12936 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 bb5d54f6
......@@ -113,10 +113,12 @@ static switch_status_t tech_init(private_t *tech_pvt, switch_core_session_t *ses
if (tech_pvt->read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->read_codec);
memset(&tech_pvt->read_codec, 0, sizeof(tech_pvt->read_codec));
}
if (tech_pvt->write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->write_codec);
memset(&tech_pvt->write_codec, 0, sizeof(tech_pvt->write_codec));
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s setup codec %s/%d/%d\n", switch_channel_get_name(channel), iananame, rate, interval);
......@@ -366,6 +368,16 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
switch_core_timer_destroy(&tech_pvt->timer);
if (tech_pvt->read_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->read_codec);
memset(&tech_pvt->read_codec, 0, sizeof(tech_pvt->read_codec));
}
if (tech_pvt->write_codec.implementation) {
switch_core_codec_destroy(&tech_pvt->write_codec);
memset(&tech_pvt->write_codec, 0, sizeof(tech_pvt->write_codec));
}
return SWITCH_STATUS_SUCCESS;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论