From: Andrey Volk Date: Sat, 16 Jan 2021 19:53:23 +0000 (+0300) Subject: [Core] Fix codec ready checks in switch_core_session_read_frame() X-Git-Tag: v1.10.6^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82b6f01b692afe3a76a28e6650b7b51361300bbe;p=thirdparty%2Ffreeswitch.git [Core] Fix codec ready checks in switch_core_session_read_frame() --- diff --git a/src/switch_core_io.c b/src/switch_core_io.c index 22d0474e3e..1d5ff7510b 100644 --- a/src/switch_core_io.c +++ b/src/switch_core_io.c @@ -227,7 +227,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi switch_assert((*frame)->codec != NULL); - if (!(session->read_codec && (*frame)->codec && (*frame)->codec->implementation) && switch_core_codec_ready((*frame)->codec)) { + if (!switch_core_codec_ready(session->read_codec) || !switch_core_codec_ready((*frame)->codec)) { status = SWITCH_STATUS_FALSE; goto done; }