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

libavcodec/mlpdec.c:781:31: Call
779.     if (s->param_presence_flags & PARAM_HUFFOFFSET)
780.         if (bitstream_read_bit(bc))
781.             cp->huff_offset = bitstream_read_signed(bc, 15);
                                   ^
782. 
783.     cp->codebook  = bitstream_read(bc, 2);

libavcodec/bitstream.h:199:1: Parameter `n`
  197. /* Return n bits from the buffer as a signed integer.
  198.  * n has to be in the 0-32 range. */
  199. static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)
       ^
  200. {
  201.     return sign_extend(bitstream_read(bc, n), n);

libavcodec/bitstream.h:201:24: Call
  199. static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)
  200. {
  201.     return sign_extend(bitstream_read(bc, n), n);
                              ^
  202. }
  203. 

libavcodec/bitstream.h:183:1: Parameter `n`
    181. 
    182. /* Return n bits from the buffer. n has to be in the 0-32 range. */
    183. static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)
         ^
    184. {
    185.     if (!n)

libavcodec/bitstream.h:194:12: Call
    192.     }
    193. 
    194.     return get_val(bc, n);
                    ^
    195. }
    196. 

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: ([1, +oo] - 15):unsigned32 by call to `bitstream_read_signed` 
      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_channel_params(MLPDecodeContext *m, unsigned int substr,\n                               BitstreamContext *bc, unsigned int ch)\n{\n    SubStream *s = &m->substream[substr];\n    ChannelParams *cp = &s->channel_params[ch];\n    FilterParams *fir = &cp->filter_params[FIR];\n    FilterParams *iir = &cp->filter_params[IIR];\n    int ret;\n    if (s->param_presence_flags & PARAM_FIR)\n        if (bitstream_read_bit(bc))\n            if ((ret = read_filter_params(m, bc, substr, ch, FIR)) < 0)\n                return ret;\n    if (s->param_presence_flags & PARAM_IIR)\n        if (bitstream_read_bit(bc))\n            if ((ret = read_filter_params(m, bc, substr, ch, IIR)) < 0)\n                return ret;\n    if (fir->order + iir->order > 8) {\n        av_log(m->avctx, AV_LOG_ERROR, "Total filter orders too high.\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    if (fir->order && iir->order &&\n        fir->shift != iir->shift) {\n        av_log(m->avctx, AV_LOG_ERROR,\n                "FIR and IIR filters must use the same precision.\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    if (!fir->order && iir->order)\n        fir->shift = iir->shift;\n    if (s->param_presence_flags & PARAM_HUFFOFFSET)\n        if (bitstream_read_bit(bc))\n            cp->huff_offset = bitstream_read_signed(bc, 15);\n    cp->codebook  = bitstream_read(bc, 2);\n    cp->huff_lsbs = bitstream_read(bc, 5);\n    if (cp->huff_lsbs > 24) {\n        av_log(m->avctx, AV_LOG_ERROR, "Invalid huff_lsbs.\\n");\n        return AVERROR_INVALIDDATA;\n    }\n    cp->sign_huff_offset = calculate_sign_huff(m, substr, ch);\n    return 0;\n}', 'static inline int32_t bitstream_read_signed(BitstreamContext *bc, unsigned n)\n{\n    return sign_extend(bitstream_read(bc, n), n);\n}', 'static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned n)\n{\n    if (!n)\n        return 0;\n    if (n > bc->bits_left) {\n        refill_32(bc);\n        if (bc->bits_left < 32)\n            bc->bits_left = n;\n    }\n    return get_val(bc, n);\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}']