diff options
Diffstat (limited to 'matroska/src/write.rs')
-rw-r--r-- | matroska/src/write.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/matroska/src/write.rs b/matroska/src/write.rs index aaf11d9..7eb13f1 100644 --- a/matroska/src/write.rs +++ b/matroska/src/write.rs @@ -240,15 +240,14 @@ impl WriteValue for EbmlSize { fn write_to(&self, w: &mut impl Write) -> Result<()> { match self { EbmlSize::Exact(s) => write_vint(w, *s as u64)?, - EbmlSize::Unknown => w.write_all(&(u64::MAX >> 7).to_be_bytes())?, + EbmlSize::Unknown => w.write_all(&[0xff])?, } Ok(()) } - fn size(&self) -> usize { match self { EbmlSize::Exact(s) => vint_length(*s as u64), - EbmlSize::Unknown => 8, + EbmlSize::Unknown => 1, } } } |