[asterisk-commits] kpfleming: trunk r38311 - in /trunk: ./ channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Jul 26 19:46:22 MST 2006


Author: kpfleming
Date: Wed Jul 26 21:46:22 2006
New Revision: 38311

URL: http://svn.digium.com/view/asterisk?rev=38311&view=rev
Log:
Merged revisions 38310 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r38310 | kpfleming | 2006-07-26 21:43:49 -0500 (Wed, 26 Jul 2006) | 2 lines

don't do useless translation destroy/build when the channel is already in the correct format

........

Modified:
    trunk/   (props changed)
    trunk/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=38311&r1=38310&r2=38311&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Wed Jul 26 21:46:22 2006
@@ -2472,6 +2472,10 @@
 	/* Make sure we only consider audio */
 	fmt &= AST_FORMAT_AUDIO_MASK;
 	
+	/* if already in the desired format nothing to do here */
+	if (*format == fmt)
+		return 0;
+
 	native = chan->nativeformats;
 	/* Find a translation path from the native format to one of the desired formats */
 	if (!direction)



More information about the asterisk-commits mailing list