mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
Remote: base CRC32 number of bytes for calculation on data FEC size
This commit is contained in:
parent
2833eb1b0e
commit
74a9c5d36c
@ -143,7 +143,7 @@ void RemoteSink::feed(const SampleVector::const_iterator& begin, const SampleVec
|
||||
}
|
||||
|
||||
boost::crc_32_type crc32;
|
||||
crc32.process_bytes(&metaData, 24);
|
||||
crc32.process_bytes(&metaData, sizeof(RemoteMetaDataFEC)-4);
|
||||
metaData.m_crc32 = crc32.checksum();
|
||||
RemoteSuperBlock& superBlock = m_dataBlock->m_superBlocks[0]; // first block
|
||||
superBlock.init();
|
||||
|
@ -321,7 +321,7 @@ void RemoteSource::handleDataBlock(RemoteDataBlock* dataBlock)
|
||||
{
|
||||
RemoteMetaDataFEC *metaData = (RemoteMetaDataFEC *) &(dataBlock->m_superBlocks[0].m_protectedBlock);
|
||||
boost::crc_32_type crc32;
|
||||
crc32.process_bytes(metaData, 24);
|
||||
crc32.process_bytes(metaData, sizeof(RemoteMetaDataFEC)-4);
|
||||
|
||||
if (crc32.checksum() == metaData->m_crc32)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ void UDPSinkFEC::write(const SampleVector::iterator& begin, uint32_t sampleChunk
|
||||
metaData.m_tv_usec = ts_usecs % 1000000UL;
|
||||
|
||||
boost::crc_32_type crc32;
|
||||
crc32.process_bytes(&metaData, 24);
|
||||
crc32.process_bytes(&metaData, sizeof(RemoteMetaDataFEC)-4);
|
||||
|
||||
metaData.m_crc32 = crc32.checksum();
|
||||
|
||||
|
@ -284,7 +284,7 @@ void RemoteInputBuffer::writeData(char *array)
|
||||
RemoteMetaDataFEC *metaData = (RemoteMetaDataFEC *) recoveredBlock;
|
||||
|
||||
boost::crc_32_type crc32;
|
||||
crc32.process_bytes(metaData, 24);
|
||||
crc32.process_bytes(metaData, sizeof(RemoteMetaDataFEC)-4);
|
||||
|
||||
if (crc32.checksum() == metaData->m_crc32)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user