diff --git a/src/switch_rtp.c b/src/switch_rtp.c index 0fc076ff68..adc110c81c 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -4378,7 +4378,7 @@ static void do_flush(switch_rtp_t *rtp_session, int force) if (switch_rtp_ready(rtp_session) ) { if (rtp_session->jb && !rtp_session->pause_jb && jb_valid(rtp_session)) { - return; + goto end; } if (rtp_session->flags[SWITCH_RTP_FLAG_DEBUG_RTP_READ]) { @@ -4434,6 +4434,8 @@ static void do_flush(switch_rtp_t *rtp_session, int force) } } + end: + READ_DEC(rtp_session); }