Bug fix for translation updates. Thanks Josh!
authorMatthew Fredrickson <creslin@digium.com>
Sat, 25 Feb 2006 19:53:45 +0000 (19:53 +0000)
committerMatthew Fredrickson <creslin@digium.com>
Sat, 25 Feb 2006 19:53:45 +0000 (19:53 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11119 65c4cc65-6c06-0410-ace0-fbb531ad65f3

translate.c

index 45bbf2c..1ebbc1f 100644 (file)
@@ -470,8 +470,10 @@ int ast_translator_best_choice(int *dst, int *srcs)
                /* We will need to translate */
                AST_LIST_LOCK(&translators);
                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 */