[linux-dvb] MPE decapsulation and crc32

Trent Piepho xyzzy at speakeasy.org
Tue Nov 28 08:56:48 CET 2006


On Mon, 27 Nov 2006, Harnois Anne-Sophie wrote:
> In dvb_demux file demux->check_crc32 is called and this function
> calculates crc32 via crc32_be function and stored it in sec->crc_val.
>
> CRC is computed on MPE frame including MPE header data and MPE CRC
> itself, isn't it? Why is MPE CRC included in this CRC calculation?
>
> And once CRC is calculated, it is stored in sec->crc_val but this result
> seems to be never used, doesn't it? Should'nt be the calculated CRC
> compared to another to check if CRC was correct or not?

Normally, the way a crc is checked is to compute the crc over all the data
and the crc field.  This should result in a CRC of 0 (or some other value,
often all 1s).  The value in the CRC field is chosen so that the value of
the final crc will be zero (or whatever it's supposed to be).



More information about the linux-dvb mailing list