]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Allow packetization vaules > 127
authorTerry Wilson <twilson@digium.com>
Thu, 22 Dec 2011 18:38:46 +0000 (18:38 +0000)
committerTerry Wilson <twilson@digium.com>
Thu, 22 Dec 2011 18:38:46 +0000 (18:38 +0000)
According to the RTP packetization documentation, and the maximum values
listed in AST_FORMAT_LIST, we should support values > that the signed
char array that ast_codec_pref makes available to store the value. All
places in the code treat the framing field as though it were an int
array instaead of a char array anyway, so this just fixes the type of
the array.

(closes issue ASTERISK-18876)
Review: https://reviewboard.asterisk.org/r/1639/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@348833 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/frame.h

index 07bad8ed88e6f8dc1109ffa410a75a5d97f18aff..6dcabda1f5c7414372fb803874a43f262c5f2ac1 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
 struct ast_codec_pref {
        char order[sizeof(format_t) * 8];
-       char framing[sizeof(format_t) * 8];
+       int framing[64]; /*!< Magic numbers are bad, but this just needs to be bigger than ARRAY_LEN(AST_FORMAT_LIST) */
 };
 
 /*!