diff options
author | metamuffin <metamuffin@disroot.org> | 2024-01-28 23:41:32 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-01-28 23:41:32 +0100 |
commit | ab0e2e306b7872d1c1e6494994070f52fe1b3c00 (patch) | |
tree | 859228b2cad149bc4cb4a76299ec29cd36ac28d0 /remuxer/src/extract.rs | |
parent | 1b8181e34fbbc6a6dfb89afa704e1e1d8fe7ff68 (diff) | |
download | jellything-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.rs | 5 |
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:?}"), |