diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-28 03:21:03 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-28 03:21:03 +0100 |
commit | ce9eb140ab9243d1c87ace4727a82b7fa50f964b (patch) | |
tree | b64da94ba58f72a2371cdd8644dc48a178b7d260 /matroska/src/bin/mkvdump.rs | |
parent | b514ec8cea2c2143e0bd7a0eb377c96a6f091d0d (diff) | |
download | jellything-ce9eb140ab9243d1c87ace4727a82b7fa50f964b.tar jellything-ce9eb140ab9243d1c87ace4727a82b7fa50f964b.tar.bz2 jellything-ce9eb140ab9243d1c87ace4727a82b7fa50f964b.tar.zst |
fix yet another fundamental issue in the ebml reader and seekindex.
Diffstat (limited to 'matroska/src/bin/mkvdump.rs')
-rw-r--r-- | matroska/src/bin/mkvdump.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/matroska/src/bin/mkvdump.rs b/matroska/src/bin/mkvdump.rs index 9e35716..27b4849 100644 --- a/matroska/src/bin/mkvdump.rs +++ b/matroska/src/bin/mkvdump.rs @@ -3,9 +3,7 @@ which is licensed under the GNU Affero General Public License (version 3); see /COPYING. Copyright (C) 2024 metamuffin <metamuffin.org> */ -use jellymatroska::{ - block::Block, matroska::MatroskaTag, read::EbmlReader, unflatten::IterWithPos, -}; +use jellymatroska::{block::Block, matroska::MatroskaTag, read::EbmlReader}; use std::{fs::File, io::BufReader}; fn main() { @@ -14,13 +12,13 @@ fn main() { let mut r = EbmlReader::new(BufReader::new(File::open(path).unwrap())); while let Some(tag) = r.next() { - let tag = tag.unwrap(); + let (position, tag) = tag.unwrap(); match tag { MatroskaTag::SimpleBlock(b) | MatroskaTag::Block(b) => { let b = Block::parse(&b).unwrap(); println!("block kf={} ts_off={}", b.keyframe, b.timestamp_off) } - _ => println!("{} {tag:?}", r.position), + _ => println!("{} {tag:?}", position.unwrap_or(0)), } } } |