[asterisk-commits] kpfleming: branch 1.6.0 r177231 - in /branches/1.6.0: ./ main/frame.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 18 17:15:11 CST 2009


Author: kpfleming
Date: Wed Feb 18 17:15:11 2009
New Revision: 177231

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=177231
Log:
Merged revisions 177229 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r177229 | kpfleming | 2009-02-18 17:09:58 -0600 (Wed, 18 Feb 2009) | 3 lines
  
  fix two very minor bugs: if anyone ever uses SLINEAR16 as a format in RTP, ensure that the samples are byte-swapped to network order if needed. also, when a smoother is operating on a format that has a sample rate other than 8000 samples per second, use the proper sample rate for computing delivery timestamps.
........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/frame.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/frame.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/main/frame.c?view=diff&rev=177231&r1=177230&r2=177231
==============================================================================
--- branches/1.6.0/main/frame.c (original)
+++ branches/1.6.0/main/frame.c Wed Feb 18 17:15:11 2009
@@ -113,7 +113,7 @@
 	{ AST_FORMAT_ILBC, "ilbc", 8000, "iLBC", 50, 30, 30, 30, 30 },                                         /*!< codec_ilbc.c */ /* inc=30ms - workaround */
 	{ AST_FORMAT_G726_AAL2, "g726aal2", 8000, "G.726 AAL2", 40, 10, 300, 10, 20 },                         /*!< codec_g726.c */
 	{ AST_FORMAT_G722, "g722", 16000, "G722", 80, 10, 150, 10, 20 },                                       /*!< codec_g722.c */
-	{ AST_FORMAT_SLINEAR16, "slin16", 16000, "16 bit Signed Linear PCM (16kHz)", 320, 10, 70, 10, 20 },    /*!< Signed linear (16kHz) */
+	{ AST_FORMAT_SLINEAR16, "slin16", 16000, "16 bit Signed Linear PCM (16kHz)", 320, 10, 70, 10, 20, AST_SMOOTHER_FLAG_BE },    /*!< Signed linear (16kHz) */
 	{ AST_FORMAT_JPEG, "jpeg", 0, "JPEG image"},                                                           /*!< See format_jpeg.c */
 	{ AST_FORMAT_PNG, "png", 0, "PNG image"},                                                              /*!< PNG Image format */
 	{ AST_FORMAT_H261, "h261", 0, "H.261 Video" },                                                         /*!< H.261 Video Passthrough */
@@ -246,7 +246,7 @@
 		memmove(s->data, s->data + len, s->len);
 		if (!ast_tvzero(s->delivery)) {
 			/* If we have delivery time, increment it, otherwise, leave it at 0 */
-			s->delivery = ast_tvadd(s->delivery, ast_samp2tv(s->f.samples, 8000));
+			s->delivery = ast_tvadd(s->delivery, ast_samp2tv(s->f.samples, ast_format_rate(s->format)));
 		}
 	}
 	/* Return frame */




More information about the asterisk-commits mailing list