media/libtheora/bug703135.patch

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libtheora/bug703135.patch	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,43 @@
     1.4 +diff --git a/media/libtheora/lib/huffdec.c b/media/libtheora/lib/huffdec.c
     1.5 +--- a/media/libtheora/lib/huffdec.c
     1.6 ++++ b/media/libtheora/lib/huffdec.c
     1.7 +@@ -320,16 +320,19 @@ static size_t oc_huff_node_size(int _nbi
     1.8 + /*Produces a collapsed-tree representation of the given token list.
     1.9 +   _tree: The storage for the collapsed Huffman tree.
    1.10 +          This may be NULL to compute the required storage size instead of
    1.11 +           constructing the tree.
    1.12 +   _tokens:  A list of internal tokens, in the order they are found in the
    1.13 +              codebook, and the lengths of their corresponding codewords.
    1.14 +   _ntokens: The number of tokens corresponding to this tree node.
    1.15 +   Return: The number of words required to store the tree.*/
    1.16 ++#if defined(_MSC_VER) && _MSC_VER >= 1700
    1.17 ++#pragma optimize( "", off )
    1.18 ++#endif
    1.19 + static size_t oc_huff_tree_collapse(ogg_int16_t *_tree,
    1.20 +  unsigned char _tokens[][2],int _ntokens){
    1.21 +   ogg_int16_t   node[34];
    1.22 +   unsigned char depth[34];
    1.23 +   unsigned char last[34];
    1.24 +   size_t        ntree;
    1.25 +   int           ti;
    1.26 +   int           l;
    1.27 +@@ -367,16 +370,19 @@ static size_t oc_huff_tree_collapse(ogg_
    1.28 +       /*Pop back up a level of recursion.*/
    1.29 +       else if(l-->0)nbits=depth[l+1]-depth[l];
    1.30 +     }
    1.31 +     while(l>=0);
    1.32 +   }
    1.33 +   while(l>=0);
    1.34 +   return ntree;
    1.35 + }
    1.36 ++#if defined(_MSC_VER) && _MSC_VER >= 1700
    1.37 ++#pragma optimize( "", on )
    1.38 ++#endif
    1.39 + 
    1.40 + /*Unpacks a set of Huffman trees, and reduces them to a collapsed
    1.41 +    representation.
    1.42 +   _opb:   The buffer to unpack the trees from.
    1.43 +   _nodes: The table to fill with the Huffman trees.
    1.44 +   Return: 0 on success, or a negative value on error.
    1.45 +           The caller is responsible for cleaning up any partially initialized
    1.46 +            _nodes on failure.*/

mercurial