]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] Fix codec ready checks in switch_core_session_read_frame()
authorAndrey Volk <andywolk@gmail.com>
Sat, 16 Jan 2021 19:53:23 +0000 (22:53 +0300)
committerAndrey Volk <andywolk@gmail.com>
Wed, 17 Mar 2021 15:46:23 +0000 (18:46 +0300)
src/switch_core_io.c

index 22d0474e3e205bd3d2684ec19be8ceae4fc10759..1d5ff7510b9431a5c2477d6c031c263593c7f0c0 100644 (file)
@@ -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;
        }