diff options
author | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-25 19:54:40 +0000 |
---|---|---|
committer | mattf <mattf@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-02-25 19:54:40 +0000 |
commit | 7e3435f2f387d483275ee4f4aff2f23399c261b3 (patch) | |
tree | 42607ab4801d92b9d7efe287b0555bcf4992b16e /translate.c | |
parent | 9119e56b22600b416598dbb48b110b2a6d866a4f (diff) |
Backport of fix to translation optimizations. Thanks again file!
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@11120 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'translate.c')
-rw-r--r-- | translate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/translate.c b/translate.c index 306774d78..799a4440d 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 */ |