[asterisk-commits] mmichelson: branch 1.8 r355721 - /branches/1.8/main/translate.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 17 10:04:28 CST 2012
Author: mmichelson
Date: Fri Feb 17 10:04:24 2012
New Revision: 355721
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=355721
Log:
Revert change to translate.c as it has caused an infinite loop to occur in circumstances.
Modified:
branches/1.8/main/translate.c
Modified: branches/1.8/main/translate.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/translate.c?view=diff&rev=355721&r1=355720&r2=355721
==============================================================================
--- branches/1.8/main/translate.c (original)
+++ branches/1.8/main/translate.c Fri Feb 17 10:04:24 2012
@@ -517,8 +517,11 @@
/* Is x->y->z a better choice than x->z?
* There are three conditions for x->y->z to be a better choice than x->z
* 1. if there is no step directly between x->z then x->y->z is the best and only current option.
- * 2. if x->y->z results in a more optimal sample rate conversion. */
+ * 2. if x->y->z costs less and the sample rate conversion is no less optimal.
+ * 3. if x->y->z results in a more optimal sample rate conversion. */
if (!tr_matrix[x][z].step) {
+ better_choice = 1;
+ } else if ((newcost < tr_matrix[x][z].cost) && (new_rate_change <= tr_matrix[x][z].rate_change)) {
better_choice = 1;
} else if (new_rate_change < tr_matrix[x][z].rate_change) {
better_choice = 1;
More information about the asterisk-commits
mailing list