diff --git a/src/switch_core_codec.c b/src/switch_core_codec.c index 73fca25b2c..9a6ce2a166 100644 --- a/src/switch_core_codec.c +++ b/src/switch_core_codec.c @@ -235,7 +235,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_read_codec(switch_core_s goto end; } - if (session->read_codec->next) { + if (session->read_codec->next && switch_core_codec_ready(session->read_codec->next)) { switch_codec_t *old = session->read_codec; session->read_codec = session->read_codec->next; if (session->read_codec->implementation) {