From a0ae014dc130c97bac7d057ceabe84bcfb03fe7b Mon Sep 17 00:00:00 2001 From: antonio Date: Fri, 13 Apr 2018 18:41:37 +0200 Subject: [PATCH] FS-10775 #resolve segfault switch_frame_buffer_push --- src/switch_core_media.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 62d90e490f..64f203f52a 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -1756,6 +1756,8 @@ SWITCH_DECLARE(void) switch_media_handle_destroy(switch_core_session_t *session) switch_core_session_unset_write_codec(session); switch_core_media_deactivate_rtp(session); + if (a_engine->write_fb) switch_frame_buffer_destroy(&a_engine->write_fb); + if (smh->msrp_session) switch_msrp_session_destroy(&smh->msrp_session); } @@ -6760,7 +6762,6 @@ static void *SWITCH_THREAD_FUNC audio_write_thread(switch_thread_t *thread, void mh->up = 0; switch_mutex_unlock(smh->control_mutex); - switch_frame_buffer_destroy(&a_engine->write_fb); switch_core_timer_destroy(&timer); switch_core_session_rwunlock(session);