[svn-commits] kpfleming: branch 1.2 r38310 - /branches/1.2/channel.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jul 26 19:43:49 MST 2006


Author: kpfleming
Date: Wed Jul 26 21:43:49 2006
New Revision: 38310

URL: http://svn.digium.com/view/asterisk?rev=38310&view=rev
Log:
don't do useless translation destroy/build when the channel is already in the correct format

Modified:
    branches/1.2/channel.c

Modified: branches/1.2/channel.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channel.c?rev=38310&r1=38309&r2=38310&view=diff
==============================================================================
--- branches/1.2/channel.c (original)
+++ branches/1.2/channel.c Wed Jul 26 21:43:49 2006
@@ -2328,6 +2328,10 @@
 	int native;
 	int res;
 	
+	/* 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 svn-commits mailing list