libavformat/movenc.c:262: error: Integer Overflow L2
  ([0, +oo] - 2):unsigned32 by call to `bitstream_skip`.

libavformat/movenc.c:260:18: Call
258.     bsid       = bitstream_read(&bc, 5);
259.     bsmod      = bitstream_read(&bc, 3);
260.     acmod      = bitstream_read(&bc, 3);
                      ^
261.     if (acmod == 2) {
262.         bitstream_skip(&bc, 2); // dsurmod

libavcodec/bitstream.h:183:1: Parameter `bc->bits_left`
  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)

libavformat/movenc.c:262:9: Call
260.     acmod      = bitstream_read(&bc, 3);
261.     if (acmod == 2) {
262.         bitstream_skip(&bc, 2); // dsurmod
             ^
263.     } else {
264.         if ((acmod & 1) && acmod != 1)

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

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

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

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

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

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

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

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 int mov_write_ac3_tag(AVIOContext *pb, MOVTrack *track)\n{\n    BitstreamContext bc;\n    PutBitContext pbc;\n    uint8_t buf[3];\n    int fscod, bsid, bsmod, acmod, lfeon, frmsizecod;\n    if (track->vos_len < 7)\n        return -1;\n    avio_wb32(pb, 11);\n    ffio_wfourcc(pb, "dac3");\n    bitstream_init(&bc, track->vos_data + 4, (track->vos_len - 4) * 8);\n    fscod      = bitstream_read(&bc, 2);\n    frmsizecod = bitstream_read(&bc, 6);\n    bsid       = bitstream_read(&bc, 5);\n    bsmod      = bitstream_read(&bc, 3);\n    acmod      = bitstream_read(&bc, 3);\n    if (acmod == 2) {\n        bitstream_skip(&bc, 2);\n    } else {\n        if ((acmod & 1) && acmod != 1)\n            bitstream_skip(&bc, 2);\n        if (acmod & 4)\n            bitstream_skip(&bc, 2);\n    }\n    lfeon = bitstream_read_bit(&bc);\n    init_put_bits(&pbc, buf, sizeof(buf));\n    put_bits(&pbc, 2, fscod);\n    put_bits(&pbc, 5, bsid);\n    put_bits(&pbc, 3, bsmod);\n    put_bits(&pbc, 3, acmod);\n    put_bits(&pbc, 1, lfeon);\n    put_bits(&pbc, 5, frmsizecod >> 1);\n    put_bits(&pbc, 5, 0);\n    flush_put_bits(&pbc);\n    avio_write(pb, buf, sizeof(buf));\n    return 11;\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 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        skip_remaining(bc, bc->bits_left);\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}']