wangf1978 / DumpTS

Extract elementary stream from all kinds of media files, show inside media meta information and reconstruct Transport-Stream, ISOBMFF, Matroska and MMT media files
MIT License
59 stars 15 forks source link

CRC check of TLV/MMT stream #15

Open MMT-TLVassociation opened 2 years ago

MMT-TLVassociation commented 2 years ago

https://github.com/MMT-TLVassociation/DumpTS/commit/c884656196b29790064bb09ad455a6f7470431a8 (In crc.cpp, const uint8_t is changed to uint8_t . )

I added code to check CRC in DumpTS.

example: DumpTS file.mmts --CID=1 --pid=0xF300 --output=e00301.hevc

If there are any CRC error in TLV/MMT stream, CRC false message is output. I'll pull request if your are OK.

wangf1978 commented 2 years ago

Hi, thanks for your contribution, it is ok for me, please go ahead.

MMT-TLVassociation commented 2 years ago

Thank you.

wangf1978 commented 2 years ago

Your codebase seems not to be a fork of the original source depot, I merged your changes manually, and I found some typos, and I changed it, the main change is

    if (peek_msg_id == 0x8000 || 0x8002 || 0x8003 || 0x8004)// Packet_id, which includes CRC32

Changed it to

    if (peek_msg_id == 0x8000 || peek_msg_id == 0x8002 || peek_msg_id == 0x8003 || peek_msg_id == 0x8004)// Packet_id, which includes CRC32

Please see commit

MMT-TLVassociation commented 2 years ago

Yes, you are correct. Thank you for manually merging the changes.