Summary: | ASTERISK-05012: [patch] Small speed improvement to ast_rtp_raw_write | ||
Reporter: | Carlos Antunes (cmantunes) | Labels: | |
Date Opened: | 2005-10-05 09:57:44 | Date Closed: | 2008-01-15 15:51:02.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Core/RTP |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 2005-10-05-1-rtp.patch | |
Description: | ast_rtp_raw_write on rtp.c is making use of the function ast_codec_get_samples to determine number of samples in a frame. However, this data is already available in f->samples. As such, a call to ast_codec_get_samples is not only unnecesaary but incurs a small performance penalty as well. Patch is provided to use f->samples instead. | ||
Comments: | By: Kevin P. Fleming (kpfleming) 2005-10-13 20:09:19 Committed to CVS HEAD, thanks! By: Digium Subversion (svnbot) 2008-01-15 15:51:02.000-0600 Repository: asterisk Revision: 6781 U trunk/rtp.c ------------------------------------------------------------------------ r6781 | kpfleming | 2008-01-15 15:51:02 -0600 (Tue, 15 Jan 2008) | 2 lines use existing sample size in frame instead of recalculating it (issue ASTERISK-5012) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=6781 |