提交 f17eece9 authored 作者: Michael Jerris's avatar Michael Jerris

fail the call when the best match is a codec with no name.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4065 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 b6bcd30d
...@@ -1348,6 +1348,12 @@ static switch_status_t tech_set_codec(private_object_t *tech_pvt, int force) ...@@ -1348,6 +1348,12 @@ static switch_status_t tech_set_codec(private_object_t *tech_pvt, int force)
channel = switch_core_session_get_channel(tech_pvt->session); channel = switch_core_session_get_channel(tech_pvt->session);
assert(channel != NULL); assert(channel != NULL);
if (!tech_pvt->rm_encoding) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't load codec with no name?\n");
terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __LINE__);
return SWITCH_STATUS_FALSE;
}
if (switch_core_codec_init(&tech_pvt->read_codec, if (switch_core_codec_init(&tech_pvt->read_codec,
tech_pvt->rm_encoding, tech_pvt->rm_encoding,
tech_pvt->rm_fmtp, tech_pvt->rm_fmtp,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论