Ticket #62: bugfix_parcat.patch
File bugfix_parcat.patch, 891 bytes (added by tpoirier, 6 years ago) |
---|
-
App/Parcat/parcat.cpp
138 138 *nal_end = 0; 139 139 140 140 i = 0; 141 while ( 141 while (i + 3 < size && //( next_bits( 24 ) != 0x000001 && next_bits( 32 ) != 0x00000001 ) 142 142 (buf[i] != 0 || buf[i+1] != 0 || buf[i+2] != 0x01) && 143 143 (buf[i] != 0 || buf[i+1] != 0 || buf[i+2] != 0 || buf[i+3] != 0x01) 144 144 ) 145 145 { 146 146 i++; // skip leading zero 147 if (i+4 >= size) { return 0; } // did not find nal start147 if (i+4 >= size) { printf("Unexpected EOF \n"); exit(-1); } // did not find nal start 148 148 } 149 149 150 if (i + 3 >= size) { return 0; } 151 150 152 if (buf[i] != 0 || buf[i+1] != 0 || buf[i+2] != 0x01) // ( next_bits( 24 ) != 0x000001 ) 151 153 { 152 154 i++;