提交 79933d30 authored 作者: Mike Jerris's avatar Mike Jerris

Merge pull request #557 in FS/freeswitch from ~BRADLEYJOKINEN/freeswitch:FS-8348 to master

* commit 'a52aaa92':
  FS-8348 Fix crash caused by trying to get channel of a null session
...@@ -753,7 +753,6 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec, ...@@ -753,7 +753,6 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec,
if (*flag & SFF_PLC) { if (*flag & SFF_PLC) {
switch_core_session_t *session = codec->session; switch_core_session_t *session = codec->session;
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_jb_t *jb = NULL; switch_jb_t *jb = NULL;
plc = 1; plc = 1;
...@@ -761,6 +760,8 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec, ...@@ -761,6 +760,8 @@ static switch_status_t switch_opus_decode(switch_codec_t *codec,
encoded_data = NULL; encoded_data = NULL;
if ((opus_prefs.use_jb_lookahead || context->use_jb_lookahead) && context->codec_settings.useinbandfec && session) { if ((opus_prefs.use_jb_lookahead || context->use_jb_lookahead) && context->codec_settings.useinbandfec && session) {
switch_channel_t *channel = switch_core_session_get_channel(session);
if (!context->look_check) { if (!context->look_check) {
context->look_ts = switch_true(switch_channel_get_variable_dup(channel, "jb_use_timestamps", SWITCH_FALSE, -1)); context->look_ts = switch_true(switch_channel_get_variable_dup(channel, "jb_use_timestamps", SWITCH_FALSE, -1));
context->look_check = 1; context->look_check = 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论