From 705fba50de94a7efdb9fe635ee683d6a615348f8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 31 Jul 2023 21:38:24 +0200 Subject: working as good as before (maybe) --- tools/src/bin/import.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tools/src') diff --git a/tools/src/bin/import.rs b/tools/src/bin/import.rs index c048eb5..c886adf 100644 --- a/tools/src/bin/import.rs +++ b/tools/src/bin/import.rs @@ -136,8 +136,18 @@ fn main() -> anyhow::Result<()> { std::fs::copy(&input, &source_path)?; let input = File::open(&source_path).unwrap(); let mut input = EbmlReader::new(input); - let (tracks, local_tracks, _seek_index) = + let (tracks, local_tracks, seek_index) = import_read(&source_path.to_path_buf(), &mut input)?; + + for (tn, index) in seek_index { + info!("writing index {tn} with {} blocks", index.blocks.len()); + bincode::encode_into_std_write( + index, + &mut File::create(source_path.with_extension(&format!("si.{tn}")))?, + bincode::config::standard(), + )?; + } + kind = NodeKind::Movie; media = Some(MediaInfo { tracks, -- cgit v1.2.3-70-g09d2