]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
CID:1214189 Division or modulo by float zero
authorMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 14:54:54 +0000 (14:54 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 16 May 2014 14:54:54 +0000 (14:54 +0000)
libs/libteletone/src/libteletone_detect.c

index b89ea116455573e54558b158b476474a53e9bb4a..f25fea73ff31de4e7a6cfedafeceb181549efedf 100644 (file)
@@ -141,6 +141,10 @@ TELETONE_API(void) teletone_dtmf_detect_init (teletone_dtmf_detect_state_t *dtmf
        int i;
        float theta;
 
+       if (!sample_rate) {
+               sample_rate = 8000;
+       }
+
        dtmf_detect_state->hit1 = dtmf_detect_state->hit2 = 0;
 
        for (i = 0;      i < GRID_FACTOR;  i++) {