[commit] r10452 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Author: anthm Date: Tue Nov 18 20:05:36 2008 New Revision: 10452 Log: update Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Tue Nov 18 20:05:36 2008 @@ -706,8 +706,6 @@ 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 @@ } tech_pvt->check_frames++; } + } else { + tech_pvt->mismatch_count = 0; } tech_pvt->last_ts = tech_pvt->read_frame.timestamp; } Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h Tue Nov 18 20:05:36 2008 @@ -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;
participants (1)
-
FreeSWITCH SVN