libavformat/avc.c:39: error: Integer Overflow L2
  ([0, `*p`] - 16843009):unsigned32.

libavformat/avc.c:26:1: <LHS trace>
24. #include "avio.h"
25. 
26. const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)
    ^
27. {
28.     const uint8_t *a = p + 4 - ((intptr_t)p & 3);

libavformat/avc.c:26:1: Parameter `*p`
24. #include "avio.h"
25. 
26. const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)
    ^
27. {
28.     const uint8_t *a = p + 4 - ((intptr_t)p & 3);

libavformat/avc.c:36:9: Assignment
34. 
35.     for( end -= 3; p < end; p += 4 ) {
36.         uint32_t x = *(const uint32_t*)p;
            ^
37. //      if( (x - 0x01000100) & (~x) & 0x80008000 ) // little endian
38. //      if( (x - 0x00010001) & (~x) & 0x00800080 ) // big endian

libavformat/avc.c:39:13: Binary operation: ([0, *p] - 16843009):unsigned32
37. //      if( (x - 0x01000100) & (~x) & 0x80008000 ) // little endian
38. //      if( (x - 0x00010001) & (~x) & 0x00800080 ) // big endian
39.         if( (x - 0x01010101) & (~x) & 0x80808080 ) { // generic
                ^
40.             if( p[1] == 0 ) {
41.                 if( p[0] == 0 && p[2] == 1 )

const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)
{
    const uint8_t *a = p + 4 - ((intptr_t)p & 3);
    for( end -= 3; p < a && p < end; p++ ) {
        if( p[0] == 0 && p[1] == 0 && p[2] == 1 )
            return p;
    }
    for( end -= 3; p < end; p += 4 ) {
        uint32_t x = *(const uint32_t*)p;
        if( (x - 0x01010101) & (~x) & 0x80808080 ) {
            if( p[1] == 0 ) {
                if( p[0] == 0 && p[2] == 1 )
                    return p-1;
                if( p[2] == 0 && p[3] == 1 )
                    return p;
            }
            if( p[3] == 0 ) {
                if( p[2] == 0 && p[4] == 1 )
                    return p+1;
                if( p[4] == 0 && p[5] == 1 )
                    return p+2;
            }
        }
    }
    for( end += 3; p < end; p++ ) {
        if( p[0] == 0 && p[1] == 0 && p[2] == 1 )
            return p;
    }
    return end + 3;
}
['const uint8_t *ff_avc_find_startcode(const uint8_t *p, const uint8_t *end)\n{\n    const uint8_t *a = p + 4 - ((intptr_t)p & 3);\n    for( end -= 3; p < a && p < end; p++ ) {\n        if( p[0] == 0 && p[1] == 0 && p[2] == 1 )\n            return p;\n    }\n    for( end -= 3; p < end; p += 4 ) {\n        uint32_t x = *(const uint32_t*)p;\n        if( (x - 0x01010101) & (~x) & 0x80808080 ) {\n            if( p[1] == 0 ) {\n                if( p[0] == 0 && p[2] == 1 )\n                    return p-1;\n                if( p[2] == 0 && p[3] == 1 )\n                    return p;\n            }\n            if( p[3] == 0 ) {\n                if( p[2] == 0 && p[4] == 1 )\n                    return p+1;\n                if( p[4] == 0 && p[5] == 1 )\n                    return p+2;\n            }\n        }\n    }\n    for( end += 3; p < end; p++ ) {\n        if( p[0] == 0 && p[1] == 0 && p[2] == 1 )\n            return p;\n    }\n    return end + 3;\n}']