]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix FSCORE-206
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 17 Oct 2008 23:00:23 +0000 (23:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 17 Oct 2008 23:00:23 +0000 (23:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10056 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_io.c

index 95f8f5c96593b0bf73eaabc2537c871ef875e206..54cb144507a0c809d1f736b6fbb8ae4c3cee0861 100644 (file)
@@ -496,7 +496,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
 
   even_more_done:
 
-       if (!*frame) {
+       if (!*frame || !(*frame)->codec || !(*frame)->codec->implementation) {
                *frame = &runtime.dummy_cng_frame;
        }
 
@@ -559,6 +559,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
        }
 
        switch_assert(frame->codec != NULL);
+       switch_assert(frame->codec->implementation != NULL);
 
        if ((session->write_codec && frame->codec && session->write_codec->implementation != frame->codec->implementation)) {
                need_codec = TRUE;