]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 19 Nov 2008 01:05:36 +0000 (01:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 19 Nov 2008 01:05:36 +0000 (01:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10452 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h

index 371c3a824d9f3ffc540ed2efef4c602ac504d330..dc50c95ebae0e02cd29b117a37e4f2d28b14527b 100644 (file)
@@ -706,8 +706,6 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
 
                                        if (tech_pvt->check_frames < MAX_CODEC_CHECK_FRAMES) {
                                                if (tech_pvt->last_ts && tech_pvt->read_frame.datalen != tech_pvt->read_codec.implementation->encoded_bytes_per_packet) {
-
-                                                       
                                                        if (++tech_pvt->mismatch_count >= MAX_MISMATCH_FRAMES) {
                                                                switch_size_t codec_ms = (int)(tech_pvt->read_frame.timestamp - 
                                                                                                                           tech_pvt->last_ts) / (tech_pvt->read_codec.implementation->samples_per_second / 1000);
@@ -774,6 +772,8 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                                                                }
                                                                tech_pvt->check_frames++;
                                                        }
+                                               } else {
+                                                       tech_pvt->mismatch_count = 0;
                                                }
                                                tech_pvt->last_ts = tech_pvt->read_frame.timestamp;
                                        }
index 0fec2301efb90585ce5eb11adeeae3fe219bb7a7..c45fd613e22221b3e01e7e4a751a395f9a8cb1f9 100644 (file)
@@ -54,7 +54,7 @@
 #endif
 
 #define MAX_CODEC_CHECK_FRAMES 50
-#define MAX_MISMATCH_FRAMES 5
+#define MAX_MISMATCH_FRAMES 3
 #define MODNAME "mod_sofia"
 static const switch_state_handler_table_t noop_state_handler = { 0 };
 struct sofia_gateway;