Revision cb590b48 libavcodec/h261_parser.c

View differences:

libavcodec/h261_parser.c
38 38
    for(i=0; i<buf_size && !vop_found; i++){
39 39
        state= (state<<8) | buf[i];
40 40
        for(j=0; j<8; j++){
41
            if(((state>>j)&0xFFFFF) == 0x00010){
41
            if(((state>>j)&0xFFFFF0) == 0x000100){
42 42
                vop_found=1;
43 43
                break;
44 44
            }
......
48 48
        for(; i<buf_size; i++){
49 49
            state= (state<<8) | buf[i];
50 50
            for(j=0; j<8; j++){
51
                if(((state>>j)&0xFFFFF) == 0x00010){
51
                if(((state>>j)&0xFFFFF0) == 0x000100){
52 52
                    pc->frame_start_found=0;
53
                    pc->state= state>>(2*8);
54
                    return i-1;
53
                    pc->state= (state>>(3*8))+0xFF00;
54
                    return i-2;
55 55
                }
56 56
            }
57 57
        }

Also available in: Unified diff