]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
if we happen to change codecs during a hold/unhold update the samples per packet...
authorBrian West <brian@freeswitch.org>
Thu, 13 Nov 2008 18:06:40 +0000 (18:06 +0000)
committerBrian West <brian@freeswitch.org>
Thu, 13 Nov 2008 18:06:40 +0000 (18:06 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10377 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 2fe6be6eb66973112fa5577b66fa3caebba28347..bdfed1819109d493b501498c2ad26c404244e45c 100644 (file)
@@ -1564,6 +1564,10 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
                return SWITCH_STATUS_FALSE;
        }
 
+       if (switch_rtp_ready(tech_pvt->rtp_session)) {
+               switch_rtp_set_default_samples_per_interval(tech_pvt->rtp_session, tech_pvt->read_codec.implementation->samples_per_packet);
+       }
+
        tech_pvt->read_frame.rate = tech_pvt->rm_rate;
        ms = tech_pvt->write_codec.implementation->microseconds_per_packet / 1000;