diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 2ad20ed51b..815f61f14e 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -547,12 +547,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess write_frame->rate = session->write_resampler->to_rate; } - if (!do_bugs) { - do_write = 1; - write_frame = frame; - goto done; - } - if (session->bugs) { switch_media_bug_t *bp, *dp, *last = NULL; @@ -608,6 +602,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess switch_thread_rwlock_unlock(session->bug_rwlock); } + if (do_bugs) { + do_write = 1; + write_frame = frame; + goto done; + } + if (session->write_codec) { if (write_frame->datalen == session->write_codec->implementation->bytes_per_frame) { perfect = TRUE;