]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak codec ptime bs
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 3 Dec 2008 19:25:49 +0000 (19:25 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 3 Dec 2008 19:25:49 +0000 (19:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10580 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/switch_core_io.c

index a9a459c05412a8817e6e4a801596ae580d4cce50..3408e8aba6a37a962b3af6983969cc33dbbff039 100644 (file)
@@ -722,8 +722,6 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                                                                tech_pvt->mismatch_count++;
                                                        }
                                                        
-                                                       tech_pvt->last_codec_ms = codec_ms;
-                                                       
                                                        if (tech_pvt->mismatch_count > MAX_MISMATCH_FRAMES) {
                                                                if (switch_rtp_ready(tech_pvt->rtp_session) && codec_ms != tech_pvt->codec_ms) {
                                                                        const char *val;
index 1d1730c0aedf7330627ef86f6c9051ba27b5efd2..990df63ef1189b5431726c27ca05ca1d2f704c36 100644 (file)
@@ -610,7 +610,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
        if ((session->write_codec && frame->codec && session->write_codec->implementation != frame->codec->implementation)) {
                if (session->write_codec->implementation->codec_id == frame->codec->implementation->codec_id) {
                        ptime_mismatch = TRUE;
-                       if (!need_codec) {
+                       if (switch_test_flag(frame->codec, SWITCH_CODEC_FLAG_PASSTHROUGH) || switch_test_flag(session->read_codec, SWITCH_CODEC_FLAG_PASSTHROUGH)) {
                                status = perform_write(session, frame, flags, stream_id);
                                goto error;
                        }