libavcodec/eamad.c:141: error: Integer Overflow L2
  ([0, +oo] - 9):unsigned32 by call to `bitstream_skip`.

libavcodec/eamad.c:160:23: Call
158.                 level = bitstream_read_signed(&s->bc, 10);
159. 
160.                 run = bitstream_read(&s->bc, 6) + 1;
                           ^
161. 
162.                 i += run;

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

libavcodec/eamad.c:141:13: Call
139.         /* now quantify & encode AC coefficients */
140.         for (;;) {
141.             BITSTREAM_RL_VLC(level, run, &s->bc, rl->rl_vlc[0], TEX_VLC_BITS, 2);
                 ^
142. 
143.             if (level == 127) {

libavcodec/bitstream.h:214:1: Parameter `n`
  212. /* Return n bits from the buffer, but do not change the buffer state.
  213.  * n has to be in the 0-32 range. */
  214. static inline unsigned bitstream_peek(BitstreamContext *bc, unsigned n)
       ^
  215. {
  216.     if (n > bc->bits_left)

libavcodec/eamad.c:141:13: Call
139.         /* now quantify & encode AC coefficients */
140.         for (;;) {
141.             BITSTREAM_RL_VLC(level, run, &s->bc, rl->rl_vlc[0], TEX_VLC_BITS, 2);
                 ^
142. 
143.             if (level == 127) {

libavcodec/bitstream.h:240:1: Parameter `n`
  238. 
  239. /* Skip n bits in the buffer. */
  240. static inline void bitstream_skip(BitstreamContext *bc, unsigned n)
       ^
  241. {
  242.     if (n < bc->bits_left)

libavcodec/bitstream.h:243:9: Call
  241. {
  242.     if (n < bc->bits_left)
  243.         skip_remaining(bc, n);
               ^
  244.     else {
  245.         n -= bc->bits_left;

libavcodec/bitstream.h:229:1: <LHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `bc->bits_left`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: <RHS trace>
227. }
228. 
229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
     ^
230. {
231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:229:1: Parameter `n`
    227. }
    228. 
    229. static inline void skip_remaining(BitstreamContext *bc, unsigned n)
         ^
    230. {
    231. #ifdef BITSTREAM_READER_LE

libavcodec/bitstream.h:236:5: Binary operation: ([0, +oo] - 9):unsigned32 by call to `bitstream_skip` 
    234.     bc->bits <<= n;
    235. #endif
    236.     bc->bits_left -= n;
             ^
    237. }
    238. 

static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static inline void decode_block_intra(MadContext *s, int16_t * block)\n{\n    int level, i, j, run;\n    RLTable *rl = &ff_rl_mpeg1;\n    const uint8_t *scantable = s->scantable.permutated;\n    int16_t *quant_matrix = s->quant_matrix;\n    block[0] = (128 + bitstream_read_signed(&s->bc, 8)) * quant_matrix[0];\n    i = 0;\n    {\n        for (;;) {\n            BITSTREAM_RL_VLC(level, run, &s->bc, rl->rl_vlc[0], TEX_VLC_BITS, 2);\n            if (level == 127) {\n                break;\n            } else if (level != 0) {\n                i += run;\n                if (i > 63) {\n                    av_log(s->avctx, AV_LOG_ERROR,\n                           "ac-tex damaged at %d %d\\n", s->mb_x, s->mb_y);\n                    return;\n                }\n                j = scantable[i];\n                level = (level*quant_matrix[j]) >> 4;\n                level = (level-1)|1;\n                level = bitstream_apply_sign(&s->bc, level);\n            } else {\n                level = bitstream_read_signed(&s->bc, 10);\n                run = bitstream_read(&s->bc, 6) + 1;\n                i += run;\n                if (i > 63) {\n                    av_log(s->avctx, AV_LOG_ERROR,\n                           "ac-tex damaged at %d %d\\n", s->mb_x, s->mb_y);\n                    return;\n                }\n                j = scantable[i];\n                if (level < 0) {\n                    level = -level;\n                    level = (level*quant_matrix[j]) >> 4;\n                    level = (level-1)|1;\n                    level = -level;\n                } else {\n                    level = (level*quant_matrix[j]) >> 4;\n                    level = (level-1)|1;\n                }\n            }\n            block[j] = level;\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 unsigned bitstream_peek(BitstreamContext *bc, unsigned n)\n{\n    if (n > bc->bits_left)\n        refill_32(bc);\n    return show_val(bc, n);\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n < bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        bc->bits      = 0;\n        bc->bits_left = 0;\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']