[asterisk-commits] seanbright: branch group/1.6.1-maintenance r264116 - in /team/group/1.6.1-mai...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 19 09:57:57 CDT 2010


Author: seanbright
Date: Wed May 19 09:57:53 2010
New Revision: 264116

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264116
Log:
Merged revisions 264114 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r264114 | dvossel | 2010-05-19 10:38:02 -0400 (Wed, 19 May 2010) | 13 lines
  
  fixes crash during dtmf
  
  During the processing of Cisco dtmf the dtmf samples were
  not being calculated correctly.  In an attempt to determine
  what sample rate was being used, a NULL frame was processed
  which caused a crash.  This patch resolves this.
  
  (closes issue #17248)
  Reported by: falves11
  Patches:
        issue_17248.diff uploaded by dvossel (license 671)
........

Modified:
    team/group/1.6.1-maintenance/   (props changed)
    team/group/1.6.1-maintenance/main/rtp.c

Propchange: team/group/1.6.1-maintenance/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: team/group/1.6.1-maintenance/main/rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/group/1.6.1-maintenance/main/rtp.c?view=diff&rev=264116&r1=264115&r2=264116
==============================================================================
--- team/group/1.6.1-maintenance/main/rtp.c (original)
+++ team/group/1.6.1-maintenance/main/rtp.c Wed May 19 09:57:53 2010
@@ -998,10 +998,10 @@
 		}
 	} else if ((rtp->resp == resp) && !power) {
 		f = create_dtmf_frame(rtp, AST_FRAME_DTMF_END);
-		f->samples = rtp->dtmfsamples * (rtp_get_rate(f->subclass) / 1000);
+		f->samples = rtp->dtmfsamples * (rtp->lastrxformat ? (rtp_get_rate(rtp->lastrxformat) / 1000) : 8);
 		rtp->resp = 0;
 	} else if (rtp->resp == resp)
-		rtp->dtmfsamples += 20 * (rtp_get_rate(f->subclass) / 1000);
+		rtp->dtmfsamples += 20 * (rtp->lastrxformat ? (rtp_get_rate(rtp->lastrxformat) / 1000) : 8);
 	rtp->dtmf_timeout = dtmftimeout;
 	return f;
 }




More information about the asterisk-commits mailing list