From: Matthew Fredrickson Date: Sat, 25 Feb 2006 19:54:40 +0000 (+0000) Subject: Backport of fix to translation optimizations. Thanks again file! X-Git-Tag: 1.2.7.1~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=973a1dec8849e6a4ac0c672ed1cd63bbbd3a48a4;p=thirdparty%2Fasterisk.git Backport of fix to translation optimizations. Thanks again file! git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@11120 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/translate.c b/translate.c index 306774d78f..799a4440d4 100644 --- a/translate.c +++ b/translate.c @@ -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 */