libavcodec/mlpdec.c:847: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit`.

libavcodec/mlpdec.c:799:1: Parameter `bc->bits_left`
797.  *  header. */
798. 
799. static int read_decoding_params(MLPDecodeContext *m, BitstreamContext *bc,
     ^
800.                                 unsigned int substr)
801. {

libavcodec/mlpdec.c:847:13: Call
845. 
846.     for (ch = s->min_channel; ch <= s->max_channel; ch++)
847.         if (bitstream_read_bit(bc))
                 ^
848.             if ((ret = read_channel_params(m, substr, bc, ch)) < 0)
849.                 return ret;

libavcodec/bitstream.h:145:1: Parameter `bc->bits_left`
  143. 
  144. /* Return one bit from the buffer. */
  145. static inline unsigned bitstream_read_bit(BitstreamContext *bc)
       ^
  146. {
  147.     if (!bc->bits_left)

libavcodec/bitstream.h:150:12: Call
  148.         refill_64(bc);
  149. 
  150.     return get_val(bc, 1);
                  ^
  151. }
  152. 

libavcodec/bitstream.h:130:1: <LHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `bc->bits_left`
    128. }
    129. 
    130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
         ^
    131. {
    132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: <RHS trace>
128. }
129. 
130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
     ^
131. {
132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:130:1: Parameter `n`
    128. }
    129. 
    130. static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
         ^
    131. {
    132. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:139:5: Binary operation: ([0, +oo] - 1):unsigned32 by call to `bitstream_read_bit` 
    137.     bc->bits <<= n;
    138. #endif
    139.     bc->bits_left -= n;
             ^
    140. 
    141.     return ret;

static inline uint64_t get_val(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);
    bc->bits >>= n;
#else
    uint64_t ret = bc->bits >> (64 - n);
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
    return ret;
}
['static int read_decoding_params(MLPDecodeContext *m, BitstreamContext *bc,\n                                unsigned int substr)\n{\n    SubStream *s = &m->substream[substr];\n    unsigned int ch;\n    int ret;\n    if (s->param_presence_flags & PARAM_PRESENCE)\n        if (bitstream_read_bit(bc))\n            s->param_presence_flags = bitstream_read(bc, 8);\n    if (s->param_presence_flags & PARAM_BLOCKSIZE)\n        if (bitstream_read_bit(bc)) {\n            s->blocksize = bitstream_read(bc, 9);\n            if (s->blocksize < 8 || s->blocksize > m->access_unit_size) {\n                av_log(m->avctx, AV_LOG_ERROR, "Invalid blocksize.");\n                s->blocksize = 0;\n                return AVERROR_INVALIDDATA;\n            }\n        }\n    if (s->param_presence_flags & PARAM_MATRIX)\n        if (bitstream_read_bit(bc))\n            if ((ret = read_matrix_params(m, substr, bc)) < 0)\n                return ret;\n    if (s->param_presence_flags & PARAM_OUTSHIFT)\n        if (bitstream_read_bit(bc)) {\n            for (ch = 0; ch <= s->max_matrix_channel; ch++)\n                s->output_shift[ch] = bitstream_read_signed(bc, 4);\n            if (substr == m->max_decoded_substream)\n                m->dsp.mlp_pack_output = m->dsp.mlp_select_pack_output(s->ch_assign,\n                                                                       s->output_shift,\n                                                                       s->max_matrix_channel,\n                                                                       m->avctx->sample_fmt == AV_SAMPLE_FMT_S32);\n        }\n    if (s->param_presence_flags & PARAM_QUANTSTEP)\n        if (bitstream_read_bit(bc))\n            for (ch = 0; ch <= s->max_channel; ch++) {\n                ChannelParams *cp = &s->channel_params[ch];\n                s->quant_step_size[ch] = bitstream_read(bc, 4);\n                cp->sign_huff_offset = calculate_sign_huff(m, substr, ch);\n            }\n    for (ch = s->min_channel; ch <= s->max_channel; ch++)\n        if (bitstream_read_bit(bc))\n            if ((ret = read_channel_params(m, substr, bc, ch)) < 0)\n                return ret;\n    return 0;\n}', 'static inline unsigned bitstream_read_bit(BitstreamContext *bc)\n{\n    if (!bc->bits_left)\n        refill_64(bc);\n    return get_val(bc, 1);\n}', 'static inline uint64_t get_val(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);\n    bc->bits >>= n;\n#else\n    uint64_t ret = bc->bits >> (64 - n);\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n    return ret;\n}']