libavcodec/mpeg12.c:1891: error: Integer Overflow L1
  ([1099511627520, +oo] + [0, +oo]):unsigned32 by call to `avpriv_mpv_find_start_code`.

libavcodec/mpeg12.c:1890:9: Assignment
1888.             return 0;
1889. 
1890.         start_code = -1;
              ^
1891.         buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);
1892.         mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic;

libavcodec/mpeg12.c:1891:15: Call
1889. 
1890.         start_code = -1;
1891.         buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);
                    ^
1892.         mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic;
1893.         if (s->picture_structure == PICT_BOTTOM_FIELD)

libavcodec/mpegvideo.c:125:1: <LHS trace>
123. };
124. 
125. const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
     ^
126.     int i;
127. 

libavcodec/mpegvideo.c:125:1: Parameter `*state`
  123. };
  124. 
  125. const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
       ^
  126.     int i;
  127. 

libavcodec/mpegvideo.c:133:9: Assignment
  131. 
  132.     for(i=0; i<3; i++){
  133.         uint32_t tmp= *state << 8;
               ^
  134.         *state= tmp + *(p++);
  135.         if(tmp == 0x100 || p==end)

libavcodec/mpegvideo.c:125:1: <RHS trace>
123. };
124. 
125. const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
     ^
126.     int i;
127. 

libavcodec/mpegvideo.c:125:1: Parameter `*p`
  123. };
  124. 
  125. const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
       ^
  126.     int i;
  127. 

libavcodec/mpegvideo.c:134:9: Binary operation: ([1099511627520, +oo] + [0, +oo]):unsigned32 by call to `avpriv_mpv_find_start_code` 
  132.     for(i=0; i<3; i++){
  133.         uint32_t tmp= *state << 8;
  134.         *state= tmp + *(p++);
               ^
  135.         if(tmp == 0x100 || p==end)
  136.             return p;

const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){
    int i;
    assert(p<=end);
    if(p>=end)
        return end;
    for(i=0; i<3; i++){
        uint32_t tmp= *state << 8;
        *state= tmp + *(p++);
        if(tmp == 0x100 || p==end)
            return p;
    }
    while(p<end){
        if     (p[-1] > 1      ) p+= 3;
        else if(p[-2]          ) p+= 2;
        else if(p[-3]|(p[-1]-1)) p++;
        else{
            p++;
            break;
        }
    }
    p= FFMIN(p, end)-4;
    *state= AV_RB32(p);
    return p+4;
}
['static int slice_decode_thread(AVCodecContext *c, void *arg)\n{\n    MpegEncContext *s   = *(void**)arg;\n    const uint8_t *buf  = s->gb.buffer;\n    int mb_y            = s->start_mb_y;\n    const int field_pic = s->picture_structure != PICT_FRAME;\n    s->error_count = (3 * (s->end_mb_y - s->start_mb_y) * s->mb_width) >> field_pic;\n    for (;;) {\n        uint32_t start_code;\n        int ret;\n        ret = mpeg_decode_slice((Mpeg1Context*)s, mb_y, &buf, s->gb.buffer_end - buf);\n        emms_c();\n        if (ret < 0) {\n            if (c->error_recognition >= FF_ER_EXPLODE)\n                return ret;\n            if (s->resync_mb_x >= 0 && s->resync_mb_y >= 0)\n                ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, AC_ERROR | DC_ERROR | MV_ERROR);\n        } else {\n            ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END | DC_END | MV_END);\n        }\n        if (s->mb_y == s->end_mb_y)\n            return 0;\n        start_code = -1;\n        buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);\n        mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic;\n        if (s->picture_structure == PICT_BOTTOM_FIELD)\n            mb_y++;\n        if (mb_y < 0 || mb_y >= s->end_mb_y)\n            return -1;\n    }\n}', 'const uint8_t *avpriv_mpv_find_start_code(const uint8_t * restrict p, const uint8_t *end, uint32_t * restrict state){\n    int i;\n    assert(p<=end);\n    if(p>=end)\n        return end;\n    for(i=0; i<3; i++){\n        uint32_t tmp= *state << 8;\n        *state= tmp + *(p++);\n        if(tmp == 0x100 || p==end)\n            return p;\n    }\n    while(p<end){\n        if     (p[-1] > 1      ) p+= 3;\n        else if(p[-2]          ) p+= 2;\n        else if(p[-3]|(p[-1]-1)) p++;\n        else{\n            p++;\n            break;\n        }\n    }\n    p= FFMIN(p, end)-4;\n    *state= AV_RB32(p);\n    return p+4;\n}']