|
@@ -40,13 +40,11 @@ uint32_t ts_crc32(uint8_t *data, int data_size) {
|
40
|
40
|
}
|
41
|
41
|
|
42
|
42
|
u_int32_t ts_crc32_section(struct ts_section_header *section_header) {
|
43
|
|
- // +3 to include the first 3 bytes before section_length field
|
44
|
|
- return ts_crc32(section_header->section_data, section_header->section_length + 3);
|
|
43
|
+ return ts_crc32(section_header->section_data, section_header->section_data_len);
|
45
|
44
|
}
|
46
|
45
|
|
47
|
46
|
int ts_crc32_section_check(struct ts_section_header *section_header, char *table) {
|
48
|
|
- // +3 to include the first 3 bytes before section_length field
|
49
|
|
- uint32_t check_crc = ts_crc32(section_header->section_data, section_header->section_length + 3);
|
|
47
|
+ uint32_t check_crc = ts_crc32(section_header->section_data, section_header->section_data_len);
|
50
|
48
|
|
51
|
49
|
if (check_crc != 0) {
|
52
|
50
|
ts_LOGf("!!! Wrong %s table CRC! It should be 0 but it is 0x%08x (CRC in data is 0x%08x)\n",
|