diff --git a/src/input/r_mpeg_ts.cpp b/src/input/r_mpeg_ts.cpp index 82af6030e..e404bcca0 100644 --- a/src/input/r_mpeg_ts.cpp +++ b/src/input/r_mpeg_ts.cpp @@ -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]; diff --git a/src/input/r_mpeg_ts.h b/src/input/r_mpeg_ts.h index a4b3aa48a..e6796fff4 100644 --- a/src/input/r_mpeg_ts.h +++ b/src/input/r_mpeg_ts.h @@ -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();