aboutsummaryrefslogtreecommitdiff
path: root/remuxer/src/extract.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-01-28 23:41:32 +0100
committermetamuffin <metamuffin@disroot.org>2024-01-28 23:41:32 +0100
commitab0e2e306b7872d1c1e6494994070f52fe1b3c00 (patch)
tree859228b2cad149bc4cb4a76299ec29cd36ac28d0 /remuxer/src/extract.rs
parent1b8181e34fbbc6a6dfb89afa704e1e1d8fe7ff68 (diff)
downloadjellything-ab0e2e306b7872d1c1e6494994070f52fe1b3c00.tar
jellything-ab0e2e306b7872d1c1e6494994070f52fe1b3c00.tar.bz2
jellything-ab0e2e306b7872d1c1e6494994070f52fe1b3c00.tar.zst
direct io for blocks
Diffstat (limited to 'remuxer/src/extract.rs')
-rw-r--r--remuxer/src/extract.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/remuxer/src/extract.rs b/remuxer/src/extract.rs
index 1b2b50c..bef5d4d 100644
--- a/remuxer/src/extract.rs
+++ b/remuxer/src/extract.rs
@@ -44,14 +44,13 @@ pub fn read_group(segment: &mut EbmlReader) -> anyhow::Result<(u64, Block)> {
MatroskaTag::Crc32(_) => (),
MatroskaTag::Cluster(_) => bail!("unexpected cluster"),
MatroskaTag::Timestamp(_) => (),
- MatroskaTag::SimpleBlock(_buf) => {
- let block = Block::parse(&_buf)?;
+ MatroskaTag::SimpleBlock(block) => {
return Ok((1000, block)); // HDMV/PGS does not use duration?!
}
MatroskaTag::BlockGroup(Master::Start) => (),
MatroskaTag::BlockGroup(Master::End) => return Ok((dur.unwrap(), block.unwrap())),
MatroskaTag::BlockDuration(duration) => dur = Some(duration),
- MatroskaTag::Block(buf) => block = Some(Block::parse(&buf)?),
+ MatroskaTag::Block(blk) => block = Some(blk),
MatroskaTag::Cues(_) => bail!("reached cues, this is the end"),
MatroskaTag::Segment(Master::End) => bail!("extractor reached segment end"),
_ => debug!("(rs) tag ignored: {item:?}"),