1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-06-02 13:39:54 +00:00

chore: fix clippy warnings

This commit is contained in:
Alf 2023-01-05 18:51:57 -08:00
parent c26bdcab59
commit 5b3c1becbb
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ impl EmsgBox {
4 + // id
Self::time_size(version) +
(scheme_id_uri.len() + 1) as u64 +
(value.len() as u64 + 1) as u64
(value.len() as u64 + 1)
}
fn time_size(version: u8) -> u64 {

View file

@ -19,7 +19,7 @@ impl<R: Read + Seek> ReadBox<&mut R> for MetaBox {
if version != 0 {
return Err(Error::UnsupportedBoxVersion(
BoxType::UdtaBox,
version as u8,
version,
));
}

View file

@ -427,7 +427,7 @@ impl Mp4Track {
fn sample_offset(&self, sample_id: u32) -> Result<u64> {
if !self.trafs.is_empty() {
if let Some((traf_idx, _sample_idx)) = self.find_traf_idx_and_sample_idx(sample_id) {
Ok(self.trafs[traf_idx].tfhd.base_data_offset as u64)
Ok(self.trafs[traf_idx].tfhd.base_data_offset)
} else {
Err(Error::BoxInTrafNotFound(self.track_id(), BoxType::TrafBox))
}