mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-13 05:31:44 +00:00
CRC32 should use and return 32bit values
This commit is contained in:
parent
ddc563c575
commit
8d8b9afa16
@ -285,11 +285,11 @@ static const uint32_t crc_table[256] = {
|
||||
0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4
|
||||
};
|
||||
|
||||
unsigned long
|
||||
uint32_t
|
||||
mpeg_ts_reader_c::calculate_crc32(unsigned char *data,
|
||||
int len) {
|
||||
register int i;
|
||||
unsigned long crc = 0xffffffff;
|
||||
uint32_t crc = 0xffffffff;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
crc = (crc << 8) ^ crc_table[((crc >> 24) ^ *data++) & 0xff];
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
virtual bool parse_packet(int id, unsigned char *buf);
|
||||
|
||||
private:
|
||||
unsigned long calculate_crc32(unsigned char *data, int len);
|
||||
uint32_t calculate_crc32(unsigned char *data, int len);
|
||||
int parse_pat(unsigned char *pat);
|
||||
int parse_pmt(unsigned char *pmt);
|
||||
file_status_e finish();
|
||||
|
Loading…
Reference in New Issue
Block a user