We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 951138d commit 653da4bCopy full SHA for 653da4b
src/metadata-parser.h
@@ -351,8 +351,10 @@ namespace librealsense
351
352
bool is_crc_valid(const S* md_info) const
353
{
354
- LOG_ERROR("No CRC is sent within this stream's metadata");
355
- return false;
+ Attribute crc = *(Attribute*)(reinterpret_cast<const uint8_t*>(md_info) + _crc_offset); //Attribute = CRC's type (ex. uint32_t)
+ auto computed_crc32 = rsutils::number::calc_crc32(reinterpret_cast<const uint8_t*>(md_info),
356
+ sizeof(S) - sizeof(crc));
357
+ return (crc == computed_crc32);
358
}
359
};
360
0 commit comments