提交 35259cf3 authored 作者: Moises Silva's avatar Moises Silva

Reset the whole transcoding session memory on destroy

Again, this shouldn't fix anything, but should make debugging easier.

FS-8312
上级 f3ac24bb
...@@ -864,14 +864,13 @@ static switch_status_t switch_sangoma_destroy(switch_codec_t *codec) ...@@ -864,14 +864,13 @@ static switch_status_t switch_sangoma_destroy(switch_codec_t *codec)
if (sess->encoder.txrtp) { if (sess->encoder.txrtp) {
sngtc_free_transcoding_session(&sess->encoder.reply); sngtc_free_transcoding_session(&sess->encoder.reply);
memset(&sess->encoder, 0, sizeof(sess->encoder));
} }
if (sess->decoder.txrtp) { if (sess->decoder.txrtp) {
sngtc_free_transcoding_session(&sess->decoder.reply); sngtc_free_transcoding_session(&sess->decoder.reply);
memset(&sess->decoder, 0, sizeof(sess->decoder));
} }
switch_core_hash_delete(g_sessions_hash, sess->hashkey); switch_core_hash_delete(g_sessions_hash, sess->hashkey);
memset(sess, 0, sizeof(*sess));
switch_mutex_unlock(g_sessions_lock); switch_mutex_unlock(g_sessions_lock);
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论