]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use the session interval
authorMichael Jerris <mike@jerris.com>
Wed, 25 Jun 2008 22:09:33 +0000 (22:09 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 25 Jun 2008 22:09:33 +0000 (22:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8846 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_rss/mod_rss.c

index b5dc9d34f1cc3a3e929a1d52baac37439ef468f4..b3a778ad4a3ae3a77d7e5c18be9a436d40d055a1 100644 (file)
@@ -170,7 +170,6 @@ SWITCH_STANDARD_APP(rss_function)
        switch_speech_handle_t sh;
        switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
        switch_core_thread_session_t thread_session;
-       uint32_t rate, interval = 20;
        switch_timer_t timer = { 0 }, *timerp = NULL;
        uint32_t last;
        char *mydata = NULL;
@@ -186,6 +185,8 @@ SWITCH_STANDARD_APP(rss_function)
        switch_input_args_t args = { 0 };
        const char *vcf = NULL;
        char *chanvars = switch_channel_build_param_string(channel, NULL, NULL);
+       switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
+       uint32_t rate, interval = read_codec->implementation->microseconds_per_frame / 1000;
 
        if ((vcf = switch_channel_get_variable(channel, "rss_alt_config"))) {
                cf = vcf;