aboutsummaryrefslogtreecommitdiff
path: root/evc/src/block.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-01-04 22:48:02 +0100
committermetamuffin <metamuffin@disroot.org>2023-01-04 22:48:02 +0100
commit200f8064e1b1b96acc7d4a6f0f8321b2da5c2830 (patch)
treea0d5d76b1d6604be8eaab31d6e9eef0a01660e68 /evc/src/block.rs
parent23d6c2d3b56145999c14596733853bc6de49eff3 (diff)
downloadvideo-codec-experiments-200f8064e1b1b96acc7d4a6f0f8321b2da5c2830.tar
video-codec-experiments-200f8064e1b1b96acc7d4a6f0f8321b2da5c2830.tar.bz2
video-codec-experiments-200f8064e1b1b96acc7d4a6f0f8321b2da5c2830.tar.zst
rename thing
Diffstat (limited to 'evc/src/block.rs')
-rw-r--r--evc/src/block.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/evc/src/block.rs b/evc/src/block.rs
index 69cc460..d0f940b 100644
--- a/evc/src/block.rs
+++ b/evc/src/block.rs
@@ -59,7 +59,8 @@ impl Block {
}
pub fn read(source: &mut impl std::io::Read, size: Vec2<isize>) -> anyhow::Result<Self> {
- Ok(match source.get::<u8>()? {
+ let variant = source.get::<u8>()?;
+ Ok(match variant {
0 => Block::Literal(Vec::read_const_size(source, size.area() as usize)?),
1 => Block::CompressedLiteral(Vec::read(source)?),
2 => Block::Split(Box::new({