mirror of
https://github.com/Serial-ATA/lofty-rs
synced 2025-03-04 23:07:20 +00:00
ogg_pager: Set CRC to 0 prior to generation
This commit is contained in:
parent
5059258f35
commit
bf0ac4b0d1
1 changed files with 3 additions and 0 deletions
|
@ -105,7 +105,10 @@ impl Page {
|
|||
///
|
||||
/// See [`Page::as_bytes`]
|
||||
pub fn gen_crc(&mut self) -> Result<()> {
|
||||
// The value is computed over the entire header (with the CRC field in the header set to zero) and then continued over the page
|
||||
self.header.checksum = 0;
|
||||
self.header.checksum = crc::crc32(&self.as_bytes()?);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue