]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix translation path choices.
authorMark Michelson <mmichelson@digium.com>
Thu, 9 Feb 2012 17:32:47 +0000 (17:32 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 9 Feb 2012 17:32:47 +0000 (17:32 +0000)
This change makes it so computational cost is not taken into account
when deciding if a multistep path is better than a single-step path. This
means that the only time a multistep path will be chosen is if no single-step
path exists. This ensures a better quality translation even if it turns out
to be slightly slower.

(closes issue ASTERISK-16821)
reported by Andrew Lindh

Review: https://reviewboard.asterisk.org/r/1715

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@354594 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/translate.c

index 61b4a4686d83065aa83c0ba7eb053e896a00adcf..d6039cc7e9d3142b2fb7f3f47171007f8445d9bd 100644 (file)
@@ -521,8 +521,6 @@ static void rebuild_matrix(int samples)
                                         * 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;
                                        } else {