[asterisk-commits] russell: trunk r46556 - in /trunk: ./ main/translate.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Oct 30 23:10:59 MST 2006


Author: russell
Date: Tue Oct 31 00:10:59 2006
New Revision: 46556

URL: http://svn.digium.com/view/asterisk?rev=46556&view=rev
Log:
Merged revisions 46554 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46554 | russell | 2006-10-31 00:55:07 -0500 (Tue, 31 Oct 2006) | 5 lines

Add a small tweak to the code that checks to see whether destination formats
are translatable based on the source format.  If we have already determined
that there is no translation path in one direction, don't bother checking the
other direction.

........

Modified:
    trunk/   (props changed)
    trunk/main/translate.c

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

Modified: trunk/main/translate.c
URL: http://svn.digium.com/view/asterisk/trunk/main/translate.c?rev=46556&r1=46555&r2=46556&view=diff
==============================================================================
--- trunk/main/translate.c (original)
+++ trunk/main/translate.c Tue Oct 31 00:10:59 2006
@@ -781,13 +781,14 @@
 
 		/* if we don't have a translation path from the src
 		   to this format, remove it from the result */
-		if (!tr_matrix[src_audio][powerof(x)].step)
+		if (!tr_matrix[src_audio][powerof(x)].step) {
 			res &= ~x;
+			continue;
+		}
 
 		/* now check the opposite direction */
 		if (!tr_matrix[powerof(x)][src_audio].step)
 			res &= ~x;
-
 	}
 
 	/* For a given source video format, traverse the list of
@@ -806,8 +807,10 @@
 
 		/* if we don't have a translation path from the src
 		   to this format, remove it from the result */
-		if (!tr_matrix[src_video][powerof(x)].step)
+		if (!tr_matrix[src_video][powerof(x)].step) {
 			res &= ~x;
+			continue;
+		}
 
 		/* now check the opposite direction */
 		if (!tr_matrix[powerof(x)][src_video].step)



More information about the asterisk-commits mailing list