]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Backport of fix to translation optimizations. Thanks again file!
authorMatthew Fredrickson <creslin@digium.com>
Sat, 25 Feb 2006 19:54:40 +0000 (19:54 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Sat, 25 Feb 2006 19:54:40 +0000 (19:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11120 65c4cc65-6c06-0410-ace0-fbb531ad65f3

translate.c

index 306774d78f5bc8113425c1478f39a8885ddee303..799a4440d4eddeca7ed9f650b458dfb73c82925d 100644 (file)
@@ -471,8 +471,10 @@ int ast_translator_best_choice(int *dst, int *srcs)
                /* We will need to translate */
                ast_mutex_lock(&list_lock);
                for (y = 0; y < MAX_FORMAT; y++) {
-                       if (!(cur & *dst))
+                       if (!(cur & *dst)) {
+                               cur = cur << 1;
                                continue;
+                       }
 
                        for (x = 0; x < MAX_FORMAT; x++) {
                                if ((*srcs & (1 << x)) &&                       /* x is a valid source format */