diff options
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)), } } } |