Merged revisions 46329 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 26 Oct 2006 16:35:34 +0000 (16:35 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 26 Oct 2006 16:35:34 +0000 (16:35 +0000)
commit192a93aa379d5320c0a421ccd08e3a048cb400f2
tree6c31b1171ce70639067b6401da70a67e54b51f20
parent6b2b63a9099aa095295d1197b75d8a9fba4ca9b5
Merged revisions 46329 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46329 | russell | 2006-10-26 11:31:05 -0500 (Thu, 26 Oct 2006) | 11 lines

- If the source has no audio or no video portion, do not call powerof() to
  get the format index.
- Don't run through the audio and video loops if there is no audio or video
  portion of the source
If 0 is passed to powerof, it will return -1.  This value of -1 was then being
used as an array index in these loops, which caused a crash on some systems.
Other than this issue, this code works as we expected it to.  If a format is
not in the source, and we have to translation path to it, it is not offered in
the list of acceptable destination formats.
(fixes issue #8231)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/translate.c